Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Dynamically "Lookup label field(s)" Catalog variable setting via onChange script?

Ron28
Mega Sage

I have a catalog item that has 4 variables/questions that are all similar, all getting information from a kubernetes namespace table but with different options. Currently I have this set up with 4 different questions each reading the table with different options and hide/display the relevant question depending on the options selected. 

I wondered if there was a neater way so that I will only get a single variable in my flow, as currently I need the flow to work out which of the 4 variables to use depending on options.


I already change the list of namespaces the user can select via onChange and script include and use a reference qualifier of 'sys_idINsysid_list'. However, this does not change the "Lookup label field" - I would like to update that too so that the user can select the correct namespace.

For example, when no options are specified, I want the user to select the items by showing a list of all Namespace names.
Specify the "partition" option, then I would like to see "namespace | partition" in the dropdown box  so that the user can select either namespace "abc | 1" or "abc | 2" depending on the partition they want to use.

Therefore I would like to know if it is possible to change this field in the Type Specifications via a script:
CataLogTypeSpecifications.png

Anyone?

Thanks
Ron

1 ACCEPTED SOLUTION

Ron28
Mega Sage

Hi Najmuddin

Thanks for the suggestion. I'll have a look at it but was starting to think along the lines of getting an onLoad client script to get the columns of the namespace table I need in an array of objects, put them in a hidden catalog variable and filter what needs to be displayed and pupulate a select box with the items  (and relevant columns) to be displayed.

Ron

View solution in original post

2 REPLIES 2

Najmuddin Mohd
Mega Sage

Hi @Ron28 ,

Why not use variable attributes and show four columns when clicked on reference field ?


Regards,
Najmuddin.

Ron28
Mega Sage

Hi Najmuddin

Thanks for the suggestion. I'll have a look at it but was starting to think along the lines of getting an onLoad client script to get the columns of the namespace table I need in an array of objects, put them in a hidden catalog variable and filter what needs to be displayed and pupulate a select box with the items  (and relevant columns) to be displayed.

Ron