How to write a variable attribute
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2022 04:50 AM
How can i write a variable attribute ,on variable with type reference to location table and it should show only name of the location

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2022 05:00 AM
Hi @Anna_Servicenow
By default, the location variable should show the name only unless you have added the "ref_ac_columns" attribute with multiple column names. You can write/update variable attributes on the variable record as highlighted in the below screenshot.
Also, for more information link to available variable attributes ServiceNow docs here.
Hope this helps!
If my answer helped you in any way or if this resolved your issue, please then mark it as helpful or correct accordingly to set this thread to solved.
BR.
BR.
Ishaan Shoor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2022 05:44 AM
By name i meant the region and it is custom field created on location table.
I created a reference qualifier but it is showing location and the region, i need only region.
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=u_name,ref_ac_columns_search=true

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2022 05:53 AM - edited ‎11-27-2022 06:01 AM
Yes, it will display the name because it's the default display field for the location table. If you want to display just another field from the table it's better to use the "lookup select box" type variable and select the display field as the region. The screenshot is below for reference. Let me know if you have any other questions.
Hope this helps!
BR.
Ishaan Shoor