Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Need to Display Email ID Next to Name in List Collector (Watch Parties) for record producer variable

akhilaprasa
Mega Contributor

 

Hi Team,

I am facing an issue with a Record producer variable configuration and need your guidance.

Scenario:
We have a variable called Watch Parties in a the item. It is a List Collector mapped to the Watch list field and uses the sys_user table. When searching for users in this field, only the Name is displayed.

This creates confusion because we have multiple users with the same name (e.g., Santhosh Kumar). For fields like Requestor and Affected User, the system shows the email ID next to the name, which helps identify the correct person. We need the same behavior for Watch Parties.

Current Configuration:

  • Variable Type: List Collector
  • List Table: sys_user
  • Reference Qualifier: javascript:active=true^sourceLIKExOU=Users^ORsourceLIKExOU=Contractors^ORsourceLIKExOU=Partners^ORsourceLIKExOU=External^nameISNOTEMPTY^EQ
     
  • Variable Attributes Tried : ref_ac_display_value=true,ref_ac_columns=email,user_name

Methods I Tried:

  1. Added ref_ac_columns=email,user_name in Variable Attributes → No effect.
  2. Tried ref_ac_display_value=true → No change.
  3. Checked for Display Templates → Not available in my instance.

Expected Outcome:

When searching in the Watch Parties List Collector, I want to see: Name | Email | 

similar to Requestor and Affected User fields.

But its not working, Any help or best practice would be appreciated!
Thanks in advance.

1 ACCEPTED SOLUTION

@Akhila P 

it should work for reference and list collector type variable

what's your variable type? share screenshots

did you give complete variable attributes like this?

you need not give name field in ref_ac_columns

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true,ref_ac_order_by=name

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@akhilaprasa 

when you use ref_ac_columns attribute then it will show the Name and Email when user types in.

But when they select user it will always display Name as that's OOTB display field on the sys_user table

If you want to show Emails of the selected users, then create another multi-line text variable and then auto populate it whenever list collector value is selected

this link has solution from Asif for this

Populate Email Addresses of users selected in List Collector variable to Multi Line Text Variable 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hello @Ankur Bawiskar ,

After adding ref_ac_columns in the variable’s attribute field and testing by typing in the search box, it’s still not working. The requirement is that the user should see both the name and the email when searching for a user.

Your help would be greatly appreciated.

Thanks

@Akhila P 

it should work for reference and list collector type variable

what's your variable type? share screenshots

did you give complete variable attributes like this?

you need not give name field in ref_ac_columns

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true,ref_ac_order_by=name

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hello Ankur,

Do I need to add all of this in the variable’s attribute field?

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true,ref_ac_order_by=name

I’m attaching a screenshot for your reference.

Thank You