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.

How to Get search results with contains for Reference field .

Rajat27
Tera Expert

 

 

NOTE :-  When I use " * " in reference field it is populate Results but for Without " * " its not . how can I get Same results without * , Thank you.

 

find_real_file.pngfind_real_file.pngI I I I used following 2 Approach But both are Failed.

Approach 1 ) attribute in reference field
                       ref_auto_completer=AJAXTableCompleter, 
                       ref_ac_columns=name,                  
                       ref_ac_columns_search=true

Approach 2) System Property
     Disable the glide.ui.ref_ac.startswith system property.
     added the property glide.ui.goto_use_contains and set the property value to true.

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

Hey,

1. Ensure that the system property "glide.ui.ref_ac.startswith" is set to false.

2. Confirm that the reference field has similar dictionary attributes as the following:

ref_ac_columns_search=true, ref_ac_order_by=column_name, ref_ac_columns=column_name1, column_name2, ref_auto_completer=AJAXTableCompleter

3. Create the following user preference:

Name: table_name_being_referenced.autocomplete.contains (i.e. sys_user.autocomplete.contains)

System: checked

User: leave this blank

Type: true | false

Value: true

4. After the user preference has been created log out and back into the instance for it to take effect

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

View solution in original post

7 REPLIES 7

ryan_pope
Mega Guru

This should give you what you need: 

https://community.servicenow.com/community?id=community_question&sys_id=d90ad0171b3a045cd01143f6fe4b...

  1. Disable the glide.ui.ref_ac.startswith system property . See Improving Auto-Complete Queries.
  2. Navigate to User Administration > User Preferences.
  3. Select the preference "'<referenced table>.autocomplete.contains"'.
  4. Set the value field to true.
  5. Log out and log back in to immediately display the updated search.

Thanks a lot , 

ryan.pope.

 

Aman Kumar S
Kilo Patron

Hey,

1. Ensure that the system property "glide.ui.ref_ac.startswith" is set to false.

2. Confirm that the reference field has similar dictionary attributes as the following:

ref_ac_columns_search=true, ref_ac_order_by=column_name, ref_ac_columns=column_name1, column_name2, ref_auto_completer=AJAXTableCompleter

3. Create the following user preference:

Name: table_name_being_referenced.autocomplete.contains (i.e. sys_user.autocomplete.contains)

System: checked

User: leave this blank

Type: true | false

Value: true

4. After the user preference has been created log out and back into the instance for it to take effect

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Thanks Aman ,its working for me.