can we show two table fields in one variable?

Hafila Hatta
Tera Guru

hi, i have a custom table whereby theres column:

 

column A: building code

column B: building name

 

in the catalog item, is there anyway i can display both in one variable? tried ref_ac_columns but its not working

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Hafila Hatta 

if you use reference or list collector you can use ref_ac_columns so that when user types they see both the columns, but after selecting the record they will only see the value of field which is marked as Display=true

Instead if you use Lookup Select Box variable and point to that table you can show both columns

Something like this -> specify the columns in Lookup label fields as comma separated

 

AnkurBawiskar_2-1766372458406.png

 

AnkurBawiskar_3-1766372475241.png

After Selecting the record you will see both the columns

AnkurBawiskar_4-1766372494284.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron

@Hafila Hatta 

if you want to go with reference or list collector variable

you need to give the ref_ac_columns attributes for that and give the additional fields

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=category;serial_number,ref_ac_columns_search=true,ref_ac_order_by=name

Variable attributes sections

AnkurBawiskar_5-1766372545962.png

 

Output: I have added category and serial_number as extra fields to be shown along with name

AnkurBawiskar_6-1766372557386.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader