Display Value from table

Hafsa1
Mega Sage

I have a table whose display_value=true set for location field.

I'm creating 1 catalog where for 1 reference variable I have to select country field from same table. Is it possible to populate country field value rather than location field? and how?

12 REPLIES 12

DirkRedeker
Mega Sage

Hi

Sure, you can do so.

Just make the variable as Type of "Reference" and choose the [core_country] table in the "Type Specifications" Tab of the variable definition.

 

find_real_file.png

Let me know if that answered your question.

Thanks and BR

Dirk

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Hafsa,

I assume your reference variable is referring to cmn_location table which has a country field

Once you select the value it will show location value as it is display=true

but in the catalog variable you can add attributes to show location name, country when user types in

ref_ac_columns
Applicable variables: Reference

Description: Specifies the columns whose display values appear in an auto completion list in addition to the name. Separate column names with a semi-colon. For example, ref_ac_columns=user_name;email;sys_created_on allows auto-complete to match text from the user_name, email, and sys_created_on columns.

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hafsa1
Mega Sage

Table is custom one and I have to select from this table only. In this table, location is made display=true, but I have to select country field. I'm able to see country field but once selected it's getting replaced with location field value.

 

In this case, make your custom table the referenced table as I described above, instead of the core_country table.

 

BR

Dirk