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

kaushal_snow
Giga Sage

@Hafila Hatta ,

 

can you share what you have used while trying ref_ac_columns ?

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Technical Consultant - ServiceNow Class of Legends 2025

@Hafila Hatta ,

 

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=building_code;building_name,ref_ac_columns_search=true

 

however.......once the user selects the record, only the table single display value is shown in the field........ because snow reference fields can only display one display value after selection .......you cannot have a two field display in that single reference variable by default.......

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Technical Consultant - ServiceNow Class of Legends 2025

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

@Hafila Hatta 

Hope you are doing good.

Did my reply answer your question?

💡 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