**Source URL:** https://general.veevavault.dev/clinical/mdl/documentation/mdl-commands/recreate.md

# RECREATE


```
RECREATE Componenttypename component_type_name(
  attribute_name(attribute_value),
  attribute_name(attribute_value),

  Subcomponenttypename subcomponent_type_name(
    attribute_name(attribute_value),
    attribute_name(attribute_value)
  ),

  Subcomponenttypename subcomponent_type_name(
    attribute_name(attribute_value),
    attribute_name(attribute_value)
  )
);

```

`RECREATE` is an upsert command that either creates or alters an MDL component in Vault. `RECREATE` will create a new component if it doesn’t already exist or will alter a component if the component with the same name already exists. This allows you to use the same MDL command across multiple Vault regardless of whether components already exist.

If a component type allows for subcomponents, the subcomponents can be recreated as part of the same command.

For example, imagine you want to update the Color picklist from the `CREATE` example above in Vaults where it exists by changing the label to Colors and adding a picklist entry for yellow. You also want to add the picklist if it does not already exist.

```
RECREATE Picklist color__c(
   label('Colors'),
   active(true),
   can_add_values(true),
   can_reorder_values(true),

   Picklistentry red__c(
       value('Red'),
       active(true),
       order(1)
   ),

   Picklistentry blue__c(
       value('Blue'),
       active(true),
       order(2)
   ),

   Picklistentry yellow__c(
       value('Yellow'),
       active(true),
       order(3)
   )
);

```

See [Retrieve Component Record (MDL)](/vault-api/api-reference/25.3/metadata-definition-language-mdl/retrieve-component-records/retrieve-component-record-mdl) in the Vault API Reference for details on how to generate a `RECREATE` command for a component in your Vault. To retrieve metadata of a specific component record as XML or JSON, see [Retrieve Component Record (XML/JSON)](/vault-api/api-reference/25.3/metadata-definition-language-mdl/retrieve-component-records/retrieve-component-record-xmljson).



---

**Previous:** [CREATE](/clinical/mdl/documentation/mdl-commands/create)  
**Next:** [RENAME](/clinical/mdl/documentation/mdl-commands/rename)