There are two main types of dynamic fields for the service catalogs:
Local properties
Local properties are those properties that directly belong to a service; these fields are:
id
name
createdBy
metaTags
You can use these dynamic fields like code shown below:
[ {"type":"text","title":"Service id","payloadName":"service_id","defaultValue":"{{service.id}}" }, {"type":"text","title":"Service name","payloadName":"service_name","defaultValue":"{{service.name}}" }, {"type":"text","title":"Service created by","payloadName":"service_createdBy","defaultValue":"{{service.createdBy}}" }, {"type":"dropdown","title":"Service meta tags","payloadName":"service_metatag","dataset": {"data":"{{service.metaTags()}}","label":"name","value":"value" } }]
Meta tags are the only local field that can be used in dropdown dataset fields if you want to use one specific metatag value as a default value in text fields.
So if you have some meta tags in your application as shown below, It will be rendered as a drop-down with those meta tags. To use meta tags in webhook headers webhook payload, you have to use the text version.
Relation properties load up other catalogs related to the chosen one, and you can also access those fields.
Applications
You can load up applications connected to a service using this syntax to get a list of service applications, to be shown as a drop-down below. Using this type of syntax will result in the following drop-down on the run action popup:
[// ... other user inputs {"type":"dropdown","payloadName":"service_app","title":"Service applications","dataset": {"data":"{{service.applications()}}","label":"name","value":"id" } }// ... other user inputs]
This will only bring up to 50 first applications for the service.
It is also possible to use one specific application for a text field and use a supported service.applications fields:
You can load up environments connected to a service using this syntax for getting a list of service environments, to be shown as a drop-down. Using this type of syntax will result in the following drop-down on the run action popup:
[// ... other user inputs {"type":"dropdown","payloadName":"service_env","title":"Service environments","dataset": {"data":"{{service.environments()}}","label":"name","value":"id" } }// ... other user inputs]
This will only bring up to 50 first environments for the service.
It is also possible to use one specific application for a text field and use a supported service.applications fields:
Because every service is attached only to one repository, the only relation that is not usable is dropdowns, and its syntax is different than other relations.
You can load up a repository connected to a service using this syntax to get its info for a text field and use the supported service.applications fields:
You can load up scorecards connected to a service using this syntax for getting a list of service scorecards, to be shown as a drop-down. Using this type of syntax will result in the following drop-down on the run action popup:
[// ... other user inputs {"type":"dropdown","title":"Service scorecards","payloadName":"service_scorecards","dataset": {"data":"{{service.scorecards()}}","label":"name","value":"id" } }// ... other user inputs]
This will only bring up to 50 first scorecards for the service.
It is also possible to use one specific scorecard for a text field and use a supported service.scorecards fields: