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

Hi

OK, understood. One question:

Do you reference the "Location" Table and the "Country" table from your custom table called "u_countryLocation_lookup"?

If NOT, I am wondering why not?

If YES, I am wondering why you do not want to reference the "original" tables for "Country" and "Location" in your Variables instead?

Can you tell me the reason for that?

 Just because of the duplicates, which I mentioned above, the User Experience would be strange....

If I know the background of your requirements, maybe I can offer a different solution.

Thanks for letting me know.

BR

Dirk

 

Hafsa1
Mega Sage

Do you reference the "Location" Table and the "Country" table from your custom table called "u_countryLocation_lookup"?

No, we haven't, because this table is used for specific module which is not rolled out for every country. It is limited to some countries and no idea if it's going to rolled out for all. This table use is very limited and not linked to any other module of servicenow.

All right.. Why ever you want 

Have you thought about creating your own reference tables for "country" and "location", too? Then, your variables can refer to those custom tables.

I see no chance to implement your initial requirement. Maybe there is, but I do not know.

So, I suggest with referencing your variables to separate tables, each having their own "display value". This solves your requirement and removes duplicates in the variable selection dropdown. Also, you could "pre-define" allowed" locations and countries. If you want to be free in the "country" and "location" field, so that a user can just type in something, I recommend to "sync" the two new custom reference tables with the values entered (using an AFTER BR).

Does that make sense to you?

BR

Dirk