I have Created reference field in record producer but in portal i want to show only Employee number

Akhil0006
Tera Contributor

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

 

8 REPLIES 8

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.

 

AGLearnNGrow_0-1738755574493.png

 

*************************************************************************************************************
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]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Akhil0006 

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

AnkurBawiskar_0-1738755627109.png

 

Output: I have added category and serial_number as extra fields to be shown along with name

AnkurBawiskar_1-1738755627112.png

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

we can add but with out showing name field we can show only category and serial number?

@Akhil0006 

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.

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