The item selector allows you to make single or multiple selections from your catalog entities and use the fields of the selected entities. It offers advanced filtering support, allowing you to narrow down the options of entities to be listed with the filters you define. Additionally, you can use any input value as a filter value within an item-selector configuration. You can wrap the defined filters with logical operators.
The item selector provides users with the same data browsing experience across the project during entity selection. This allows users to easily access the entity to be selected using existing search, filtering, and pagination features.
In this document, we will explore supported catalog entity types, the filter options for these entities, using an input value as a filter, and various scenarios and item-selector usage examples, including changing entity types with conditions.
Item Selector input example
[ {"type":"item-selector","payloadName":"service_id","title":"Single Service selector","helpText":"Select a service","dataset": {"data":"{{services()}}","value":"id" } }, {"type":"item-selector","payloadName":"selected_services_ids","title":"Multiple Service selector","multiple":true,"dataset": {"data":"{{services()}}","value":"id" } }]
[ {"type":"dropdown","payloadName":"type_selector","title":"Select a type for next item-selector","helpText":"you can see when set a type for next item-selector","options": [ {"value":"service","label":"Service" }, {"value":"application","label":"Application" } ] }, {"type":"item-selector","payloadName":"selected_entities","title":"Select entity based on selected type","helpText":"you will see this when type is isNotEmpty","condition": [ {"when":"type_selector","isNotEmpty":true }, {"when":"type_selector","is":"application","then": {"title":"Select an application","dataset": {"data":"{{applications()}}","value":"id" } },"else": {"title":"Select a service","dataset": {"data":"{{services()}}","value":"id" } } } ] }]
[ {"type":"item-selector","payloadName":"selected_services_ids","title":"Multiple Service selector","multiple":true,"dataset": {"data":"{{services()}}","value":"id" } }, {"type":"item-selector","payloadName":"selected_services_application_id","title":"Service's applications","helpText":"Select an application from selected services' applications","dataset": {"data":"{{applications()}}","value":"id" },"filter": [ {"column":"services","operator":"in","value":"{{selected_services_ids}}" } ] }]
Supported Catalog Entity Types
Services
The item selector supports service entities. In this section, we will explore the fields of the selected services that you can access.
Here are the fields you can use with dataset.value for a selected service entity:
In this section, we will explore the supported service filter options and the automatic relational filter options that you can apply when running an action through the service detail page.
Here are the filters that can be applied when working with services using the Item selector:
Column
Supported Operators
applications*
eq, in
environments*
eq, in
resources*
eq, in
scorecards*
eq, in
name
eq
owners
eq, in
tags
eq, in
lifecycle
eq, in
openPRs
eq,lt,lte, gt, gte
incidentsP1
eq,lt,lte, gt, gte
incidentsP2
eq,lt,lte, gt, gte
incidentsP3
eq,lt,lte, gt, gte
incidentsP4
eq,lt,lte, gt, gte
incidentsP5
eq,lt,lte, gt, gte
* Relational filter
You can use these filters like code shown below:
[ {"type":"item-selector","payloadName":"selected_service","title":"Services","helpText":"Select an item from filtered items","dataset": {"data":"{{services()}}","value":"id" },"filter": [ {"column":"lifecycle","operator":"in","value": ["Prod"] } ] }]
When this action is run through an application detail page, only the services related to that specific application will be listed.
[ {"type":"item-selector","payloadName":"selected_service","title":"Services","helpText":"Select an item from filtered items","dataset": {"data":"{{application.services()}}","value":"id" }]
When this action is run from an application detail page, it will list only the services within the relevant application that have a 'prod' lifecycle.
[ {"type":"item-selector","payloadName":"selected_service","title":"Services","helpText":"Select an item from filtered items","dataset": {"data":"{{application.services()}}","value":"id" },"filter": [ {"column":"lifecycle","operator":"in","value": ["Prod"] } ]]
Application filters
In this section, we will explore the supported application filter options and the automatic relational filter options that you can apply when running an action through the application detail page.
Here are the filters that can be applied when working with applications using the Item selector:
Column
Supported Operators
services*
eq, in
name
eq
owners
eq, in
* Relational filter
You can use these filters like code shown below:
[ {"type":"item-selector","payloadName":"selected_application","title":"Applications","helpText":"Select an item from filtered items","dataset": {"data":"{{applications()}}","value":"id" },"filter": [ {"column":"owners","operator":"in","value": ["owner_id_1","owner_id_2"] } ] }]
When this action is run through a service detail page, only the applications related to that specific service will be listed.
[ {"type":"item-selector","payloadName":"selected_application","title":"Applications","helpText":"Select an item from filtered items","dataset": {"data":"{{service.applications()}}","value":"id" }]
When this action is run from an service detail page, it will list only the applications within the relevant services that have owned by "owner_id_1" and "owner_id_2"
[ {"type":"item-selector","payloadName":"selected_application","title":"Applications","helpText":"Select an item from filtered items","dataset": {"data":"{{service.applications()}}","value":"id" },"filter": [ {"column":"owners","operator":"in","value": ["owner_id_1","owner_id_2"] } ] }]
Resource filters
In this section, we will explore the supported resource filter options and the automatic relational filter options that you can apply when running an action through the resource detail page.
Here are the filters that can be applied when working with resources using the Item selector:
Column
Supported Operators
services*
eq, in
environments*
eq, in
name
eq
provider
eq, in
accountId
eq, in
type
eq, in
availabilityZone
eq, in
mapped
eq
* Relational filter
You can use these filters like code shown below:
[ {"type":"item-selector","payloadName":"selected_resource","title":"Resources","helpText":"Select an item from filtered items","dataset": {"data":"{{resources()}}","value":"id" },"filter": [ {"column":"provider","operator":"in","value": ["AWS"] }, {"column":"type","operator":"in","value": ["AWS:EC2:VPC"] } ] }]
When this action is run through a service detail page, only the resources related to that specific service will be listed.
[ {"type":"item-selector","payloadName":"selected_resource","title":"Resources","helpText":"Select an item from filtered items","dataset": {"data":"{{service.resources()}}","value":"id" }]
When this action is run through a service detail page, it lists only the resources of the relevant service that have a provider of 'AWS' and a type of 'AWS:EC2:VPC'.
[ {"type":"item-selector","payloadName":"selected_resource","title":"Resources","helpText":"Select an item from filtered items","dataset": {"data":"{{service.resources()}}","value":"id" },"filter": [ {"column":"provider","operator":"in","value": ["AWS"] }, {"column":"type","operator":"in","value": ["AWS:EC2:VPC"] } ] }]
Environment filters
In this section, we will explore the supported environment filter options.
Here are the filters that can be applied when working with environments using the Item selector:
Column
Supported Operators
services*
eq, in
name
eq
owners
eq, in
* Relational filter
You can use these filters like code shown below:
[ {"type":"item-selector","payloadName":"selected_environment","title":"Environments","helpText":"Select an item from filtered items","dataset": {"data":"{{environments()}}","value":"id" },"filter": [ {"column":"owners","operator":"in","value": ["owner_id_1","owner_id_2"] } ] }]
When this action is run through a service detail page, only the environments related to that specific service will be listed.
[ {"type":"item-selector","payloadName":"selected_environment","title":"Environments","helpText":"Select an item from filtered items","dataset": {"data":"{{service.environments()}}","value":"id" }]
When this action is run from an service detail page, it will list only the environments within the relevant services that have owned by "owner_id_1" and "owner_id_2"
[ {"type":"item-selector","payloadName":"selected_environment","title":"Environments","helpText":"Select an item from filtered items","dataset": {"data":"{{service.environments()}}","value":"id" },"filter": [ {"column":"owners","operator":"in","value": ["owner_id_1","owner_id_2"] } ] }]
Repository filters
In this section, we will explore the supported repository filter options.
Here are the filters that can be applied when working with repositories using the Item selector:
Column
Supported Operators
services*
eq, in
name
eq
account
eq, in
provider
eq, in
* Relational filter
You can use these filters like code shown below:
[ {"type":"item-selector","payloadName":"selected_repository","title":"Repositories","helpText":"Select an item from filtered items","dataset": {"data":"{{repositories()}}","value":"id" },"filter": [ {"column":"provider","operator":"in","value": ["Github"] } ] }]
When this action is run through a service detail page, only the repositories related to that specific service will be listed.
[ {"type":"item-selector","payloadName":"selected_repository","title":"Repositories","helpText":"Select an item from filtered items","dataset": {"data":"{{service.repositories()}}","value":"id" }]
When this action is run from an service detail page, it will list only the repositories within the relevant services that have a provider of 'Github'
[ {"type":"item-selector","payloadName":"selected_repository","title":"Repositories","helpText":"Select an item from filtered items","dataset": {"data":"{{service.repositories()}}","value":"id" }"filter": [ {"column":"provider","operator":"in","value": ["Github"] } ] }]
Scorecard filters
In this section, we will explore the supported scorecard filter options.
Here are the filters that can be applied when working with scorecards using the Item selector:
Column
Supported Operators
services
eq, in
name
eq
owners
eq, in
checksPassing
eq,lt,lte, gt, gte
daysLeft
eq,lt,lte, gt, gte
servicesComplete
eq,lt,lte, gt, gte
status
eq
You can use these filters like code shown below:
[ {"type":"item-selector","payloadName":"selected_scorecard","title":"Scorecards","helpText":"Select an item from filtered items","dataset": {"data":"{{scorecards()}}","value":"id" },"filter": [ {"column":"owners","operator":"in","value": ["owner_id_1","owner_id_2"] } ] }]
When this action is run through a service detail page, only the scorecards related to that specific service will be listed.
[ {"type":"item-selector","payloadName":"selected_scorecard","title":"Scorecards","helpText":"Select an item from filtered items","dataset": {"data":"{{service.scorecards()}}","value":"id" }]
When this action is run from an service detail page, it will list only the scorecards within the relevant services that have owned by "owner_id_1" and "owner_id_2"
[ {"type":"item-selector","payloadName":"selected_scorecard","title":"Scorecards","helpText":"Select an item from filtered items","dataset": {"data":"{{service.scorecards()}}","value":"id" },"filter": [ {"column":"owners","operator":"in","value": ["owner_id_1","owner_id_2"] } ] }]
Dynamic filters
The advanced filtering feature of the item selector allows you to use input values within a filter in your form. If an item-selector filter depends on other input values, it will appear disabled when the related input values are not entered, and it will reset when the related input values are changed.
Filters manually defined as in previous examples can be used alongside dynamic filters within the same item-selector.
The first input allows you to make multiple selections from all of your services. The second input expects you to make selections from the repositories of the services you selected in the first input.
The first input allows you to make multiple selections from your services with a 'Development' lifecycle. The second input expects you to make selections from the applications of the services you selected in the first input, but only from the options managed by 'owner_id_1'.