How do you assign default values to an Asset entity?

Last time I wrote about assigning a default value to a M.Content entity. By default this entity type lacks the configuration of a default value. This time, we will take a look at the M.Asset entity. To start with the good news, the M.Asset supports settings default values. It has the functionality that I expected the M.Content to have as well. 

So how do we assign a default value to a M.Asset type? I would expect it to be configurable within the schema settings. But when we take a look at the schema, you'll not find such an option. You'll need to dig into the Create page of the entity definition. 

Go to the Manage section of your Content Hub instance and click on Pages. This will lead you to the overview of all the available pages within the Content Hub. Then type "Create" in the search, to find the create page of the M.Asset. Once you find it, click on the text. It will open the configuration of the Create page on the right side. By default, we aren't able to make changes to the Creation component. Luckily for us, Sitecore allows us to make changes by toggling the switch. See the appropriate switch in the screenshot below.

Change Creation component

When you've flipped the switch, you can edit the component. Click on Upload files options to start configuring the default values when uploading a file. In the image below you can see the options that we've got for configuring the page. The option that we are looking for, is at the bottom of the page. See the screenshot.

Add default values for Upload files

Click on Add value to configure a default value. From this point, you can set any default value on any property or relation that you would like of the M.Asset.

Keep in mind, that settings the default values for Upload files. If you allow your end-users to upload DAM assets through Excel, you can also set the default values on Excel import. Open the Import Excel at the left navigation bar. After this you can click on Add definition and select M.Asset for the definition. Then you can select your property or relation that you would like to assign a default value.

Set default value on Import Excel

Make sure that you hit save. This will ensure your changes are saved before leaving the page.

See you next time.