I have Created reference field in record producer but in portal i want to show only Employee number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 02:02 AM
I have created reference variable in record producer with sys user table but in portal if i opened variable i want to show only employee number field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 03:39 AM
You can do, this by showing the and on the selection of value, auto-populate the name in another variable. And for this use the OOTB way - Auto populate.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 03:41 AM
on sys_user table Name field is Display=true so it will show only name once value is selected.
I won't recommend changing this.
What you can do is when user types in you can show employee number using variable attributes so that while searching they can see
Something like this I did for other table, you can do for sys_user as well by enhancing
you need to give the ref_ac_columns attributes for that and give the additional fields
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=category;serial_number,ref_ac_columns_search=true,ref_ac_order_by=name
Variable attributes sections
Output: I have added category and serial_number as extra fields to be shown along with name
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 03:45 AM
we can add but with out showing name field we can show only category and serial number?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 07:20 PM
not possible.
whichever field is marked as Display=true will always show irrespective of whether you add in variable attributes or not.
Extra fields if you wish to show then add those in variable attributes as per what I shared above.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader