Skip to main content

How to use asset status

The asset status feature lets you set a status on the asset via a dropdown in the application header. To enable this feature, turn on the feature flag assetStatus in the settings part of the launch template:

{
"settings": {
"features": {
"assetStatus": true
}
}
}

Asset status dropdown

When the status is selected in the dropdown a metadata field on the asset is populated with the selected value. By default, the metadata field asset_status is set, but it can be changed by using the statusMetadataFieldName setting.

Try it out

It is possible to change the asset status options using the Asset Status settings.

{
"settings": {
"features": {
"assetStatus": true
},
"assetStatus": {
"statuses": [
{
"key": "approved",
"labels": {
"status": "Approved",
"assign": "Approve"
},
"color": "var(--AP-SUCCESS)"
},
{
"key": "rejected",
"labels": {
"status": "Rejected",
"assign": "Reject"
},
"color": "var(--AP-ERROR)"
}
]
}
}
}
Try it out

You can collect additional metadata when an asset status is set by specifying a custom form to use in the asset status modal.

{
"settings": {
"features": {
"assetStatus": true
},
"assetStatus": {
"statuses": [
{
"key": "approved",
"labels": {
"status": "Approved",
"assign": "Approve"
},
"color": "var(--AP-SUCCESS)"
},
{
"key": "rejected",
"labels": {
"status": "Rejected",
"assign": "Reject"
},
"color": "var(--AP-ERROR)",
"form": "myRejectForm"
}
]
},
"forms": {
"myRejectForm": {
"schema": {
"type": "object",
"properties": {
"asset_status_comment": {
"type": "string"
}
},
"required": [
"asset_status_comment"
]
},
"uischema": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"label": "Leave comment",
"scope": "#/properties/asset_status_comment"
}
]
}
}
}
}
}
Try it out

You can find all settings related to the Asset Status feature in the reference documentation.