Record producer reference variable, Variable attributes issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 11:39 AM
Hi Forum,
How can I set the fields for the reference table window on the service portal.
Here it is my issue,
I have some record producer with reference field to Location table, now I would like to display location code, street, city and zip code columns in the display window, with in the servcienow its working properly, but not in the service portal. its showing 3 time location code.
1st: how can I set like this sequence location code, street, city, zip
2nd : How can I give the end user search the location by locations, streets, city and zip codes.
Currently Variable attribute: ref_auto_completer=AJAXReferenceCompleter,ref_ac_order_by=u_location_code,ref_ac_columns=u_location_code;u_display_name;street;city;zip
Thanks in advance.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 08:33 AM
Appreciate and it helped me a lot for getting to know the things from the background, but I would like to get that functionality on the portal.
Currently on the portal, location field is displaying only city names list like below screenshot
but I am trying to populated list like this list location code has to be in the first place, and then followed by. name, street, city, and zip (5 fields).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 08:46 AM
Hi,
So you gave this in variable attributes section but still it is not searching on other fields?
which field on location table is display=true?
Did you check that location has duplicate location code?
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 09:25 AM
Hello,
Try this in the attributes section instead (replacing "department;id" with your field values): ref_auto_completer=AJAXTableCompleter,ref_ac_columns=department;id,ref_ac_columns_search=true
Add your column here in above script:
Then after clicking the Magnifying Glass on your new field, right click on one of the column headings and choose Configure > List Layout.
Autocomplete:
If above post is useful you can mark helpful and correct!
Thanks,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 11:23 AM
Its working in the ServiceNow UI, in portal its not displaying the values as I am expecting.
My requirement is even though user not put any value in the field in the portal, I have to display list with 5 fields, in another words by default list has to populate as below.
Currently in portal displaying like this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 11:08 PM
Hi,
As already suggested you need to add this variable attributes and then it would show 5 columns when user starts typing
ref_auto_completer=AJAXReferenceCompleter,ref_ac_order_by=u_location_code,ref_ac_columns=u_location_code;u_display_name;street;city;zip
please clear instance cache using cache.do and then logout and login again and it should work in portal
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader