- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 05:39 AM
In one of our Catalog Items, we have a List Collector field where I am displaying four columns. I am also trying to allow them to search on the display field, but it does not seem to be working.
My display field is named: u_power_bi_service_app_name
And this is what I currently have for the Variable Attributes:
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=u_pbi_service_app_approver;u_pxi_flag;u_pbi_security_group,ref_ac_columns_search=true,ref_ac_display_value=false,ref_ac_order_by=u_order
But it doesn't filter the items when I type in the first few letters of display field, like it does for other variables that only return one column.
I even tried changing:
ref_ac_display_value=false
to
ref_ac_display_value=true
but that did not do anything.
How can I get the search functionality to work properly on List Collector fields where we are showing multiple columns? I only want the search filter on my display field.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 06:20 AM
OK, I found the issue.
I misunderstood how the "ref_ac_columns_search" attribute works. I thought that you wanted it to be set to "true" if you wanted to do any sort of search/autocomplete, and "false" if you do not. However, that is not how it works. You want it to be set to "true" to do a search across ALL columns, and set to "false" if you only want to search the display column. So I actually needed to set it to "false".
The explanation can be found here: https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/field-administration/concept/c_AutoCompleteForReferenceFields.html?cshalt=yes, specifically this part:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 05:44 AM
Can you try below:
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=u_pbi_service_app_approver;u_pxi_flag;u_pbi_security_group,ref_ac_columns_search=true,ref_ac_order_by=u_order
Note: while searching with feild value please use * and search.
Hope it helps
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 06:01 AM
I already have that field that you highlighted in red set to true in my Variable Attribute statement that I posted in my original thread. As matter as fact, the only difference I see is that you removed the "ref_ac_display_value=false" attribute. I tried removing it, and it made no difference.
Perhaps I was not clear in what I want to happen. I want it to behave like the other List Collector fields that I have that one show one field. If you start typing in a value, it filters the list to show only those values that start with those letters.
For example, if I start to type in "Ac", it will then filter the list and only show the choices that start with the letters "Ac".
Like I said, it works fine for the List Collector variables where I am only showing one column. It just doesn't seem to like it when I am returning multiple columns.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 06:20 AM
OK, I found the issue.
I misunderstood how the "ref_ac_columns_search" attribute works. I thought that you wanted it to be set to "true" if you wanted to do any sort of search/autocomplete, and "false" if you do not. However, that is not how it works. You want it to be set to "true" to do a search across ALL columns, and set to "false" if you only want to search the display column. So I actually needed to set it to "false".
The explanation can be found here: https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/field-administration/concept/c_AutoCompleteForReferenceFields.html?cshalt=yes, specifically this part: