Reference Variable in Record Producer: How to Enable Multi-column Search After Initial Display Fix

RyoyaFukuda
Tera Contributor

Hi,all

I am developing a Record Producer in ServiceNow and working with a Reference type variable.

 

Original Issue:
Initially, when users clicked on the "Store Name" reference variable, they would see "No matching records found" instead of a list of available records. This happened despite users having the necessary read permissions. Records would only appear after typing a search term.
Additionally, while the display appears incorrect for Japanese users, it is correctly shown, just as it is for an Admin, for English users.

First Resolution (Partial):
I found that the issue was related to the "Variable Attributes" of the reference variable. Specifically, the following attributes were previously set:
ref_ac_columns=identification_number,ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter
After clearing all Variable Attributes, clicking the reference field now correctly displays all available records, which is a great first step!

Current Goal:
Now that the records are displaying, I want to re-enable search functionality for multiple columns. Specifically, I want users to be able to search not only by the default display field but also by the identification_number field.

My Understanding and Attempt:
I understand that ref_ac_columns_search=true along with ref_ac_columns should allow searching across specified columns. I would like to use the following attributes again:
ref_ac_columns=identification_number,ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter

But I'm concerned why this combination initially prevented any records from showing on click, even when they were present.

Environment Details:

  • ServiceNow Version: [Zurich]
  • Variable Type: Reference
  • Referenced Table: sn_customer_service_organization
  • Reference Qualifier: (Currently empty, but was previously type=business_location^EQ) This was removed during troubleshooting and will be re-added later if needed, but not impacting the current search issue.

Questions:

  1. What is the best way to configure the "Variable Attributes" for my reference variable so that it displays records upon clicking AND also allows searching by both the default display field (name) and identification_number?
  2. Is there any known interaction between ref_ac_columns_search=true (or any attribute) and the initial display of records on click, especially when compounded by a Reference Qualifier? If my previous ref_auto_completer=AJAXTableCompleter or other settings caused the "No matching records found" message initially, what might be the underlying reason?

Any guidance or examples would be greatly appreciated. Thank you in advance for your help!




Admin
RyoyaFukuda_0-1778658485041.png

 

Other User(Japanese RSM user)

RyoyaFukuda_2-1778658788647.png

→it says「No matches found.

Other User(English RSM user)

RyoyaFukuda_1-1778658720122.png

 

2 REPLIES 2

Tanushree Maiti
Mega Patron

Hi @RyoyaFukuda 

 

 Create one custom query_range ACL on your custom table.store_number 

 

Refer: Reference variable not visible in Portal for non-admin user but visible in classic view 

Reference variable in Service Portal not working following the May 2025 platform security update 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Ankur Bawiskar
Tera Patron

@RyoyaFukuda 

this should work to show extra columns and search with them as well

the columns in search should be separated with semicolon

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=identification_number;name,ref_ac_columns_search=true

No matching is caused due to query_range ACL for non-admins

you need to create query_range ACL with Table.* 

Give role to that ACL and it will start showing records for non-admins in portal reference variable, below is just an example

AnkurBawiskar_0-1778661520087.png

 

Also since you want to search with that column, 

-> create query_range ACL on Table.Identification Number and give snc_internal role, below is just an example

AnkurBawiskar_1-1778661541922.png

 

Ways to analyze and fix the query_range issue in portals using Access Analyzer 

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader