Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Show catalog item variables in columns on reference variable referencing sc_req_item

Oliver Anderson
Kilo Sage

I have a catalog item with a field called 'ritm' that references the 'sc_req_item' table in order for a user to "attach" a previous requested item to their new request. There is also a field on this catalog item called 'software_name' where the user can type in the name of software.

 

When searching in the reference field, I want the 'ritm' reference field to show the 'number', 'opened_at', and 'software_name'. I am currently using 'ref_ac_columns=number;opened_at;' to display 'number' and 'opened_at', but I can't figure out how to show variables of this specific catalog item--I can only figure out how to display the columns directly on 'sc_req_item'. I'm assuming I will have to dot-walk to the 'software_name' variable on my catalog item somehow, but I can't figure it out.

 

'ritm' variable:

OliverAnderson_0-1668527195525.png

 

Dictionary Entry on 'sc_req_item':

OliverAnderson_1-1668527298519.png

 

Current Service Portal view:

OliverAnderson_2-1668527389686.png

 

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Can you try the below in variable attribute:-

 

ref_ac_columns=number;opened_at;variables.variablename;

 

if the above does not work you can make the field as select box instead of reference and follow the steps mentioned in the below thread by Bernd7

 

https://www.servicenow.com/community/developer-forum/show-ritm-variable-values-as-variable-attribute...

 

Please mark my answer as correct based on Impact.

View solution in original post

3 REPLIES 3

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Can you try the below in variable attribute:-

 

ref_ac_columns=number;opened_at;variables.variablename;

 

if the above does not work you can make the field as select box instead of reference and follow the steps mentioned in the below thread by Bernd7

 

https://www.servicenow.com/community/developer-forum/show-ritm-variable-values-as-variable-attribute...

 

Please mark my answer as correct based on Impact.

Adding 'variables.software_name' to ref_ac_columns did not work, so I switched it to a Lookup Select Box which achieved what I wanted.

 

Thanks!

Excellent