List collector has empty pick list until user enters a character in the "available" filter box.

HugoFirst
Kilo Sage

I have a catalog form with a list collector  variable which points to cmdb_ci_server.   The list collector also has a dynamic filter which filters the list of servers for the pick list in the left pane of the list collector.  My problem is that the left pane of the list collector remains blank until the user enters at least one character in the filter box.

 

Here's the example:
Before entering a character:

HugoFirst_0-1697464713292.png

After entering a character:

 

HugoFirst_2-1697464752353.png

 

1 ACCEPTED SOLUTION

HugoFirst
Kilo Sage

A co-worker came up with the solution.  It was to add an attibute ref_qual_elements to the list of attributes ( on the "Default Value"  tab for us).  An example is: "ref_qual_elements=application_instance"  where application_instance is the field that we use to filter the list collector.

 

This fixed a second problem we stumbled across while testing the issue of this article.  The second problem is that a user could select any value in the table referenced by the list collector.  Even though we had filtered the list ( or so we thought ).  Here's the sequence of events ( notice that we had a reference qualifiere on the list collector, but not the attribute of ref_qual_elements.  In this case, the list collector points to cmdb_ci_server and is used to select one or more servers to shut down.

 

1. Open the form and select an application instance which "owns" the servers.

2. View the server list collector and notice that it appears to be empty.

3. CLick somewhere in the left selection pane and information about a server will appear below.

4. Push the "empty" selection to the right.  You have just now selected a server.

5. If you enter any character in the filter box, the appropriate list of servers owned by the application appears.  Things work normally from this point.

 

When we added the attribute of ref_qual_elements, the appropriate list of servers appears immediately once the application instance field has a value.

 

View solution in original post

3 REPLIES 3

Vishal Birajdar
Giga Sage

Hi @HugoFirst 

 

Have you checked in the list view, if all records have field (where display = true) filled.

There may be data inconsistency.

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Well, the short answer is Yes, but then I found that there was NO field with Display = True on the cmdb_ci_server table.  So I checked one, host_name.  Then I revisited the form and the behavior did NOT change.  I still need to enter a char to get the pick list to display.  That said, I noticed that a different field than host_name is being displayed in the pick list (fqdn). So I changed the display from host_name to fqdn.   But that had no effect either.  Nevertheless, all the records have values for name, host_name and fqdn.

HugoFirst
Kilo Sage

A co-worker came up with the solution.  It was to add an attibute ref_qual_elements to the list of attributes ( on the "Default Value"  tab for us).  An example is: "ref_qual_elements=application_instance"  where application_instance is the field that we use to filter the list collector.

 

This fixed a second problem we stumbled across while testing the issue of this article.  The second problem is that a user could select any value in the table referenced by the list collector.  Even though we had filtered the list ( or so we thought ).  Here's the sequence of events ( notice that we had a reference qualifiere on the list collector, but not the attribute of ref_qual_elements.  In this case, the list collector points to cmdb_ci_server and is used to select one or more servers to shut down.

 

1. Open the form and select an application instance which "owns" the servers.

2. View the server list collector and notice that it appears to be empty.

3. CLick somewhere in the left selection pane and information about a server will appear below.

4. Push the "empty" selection to the right.  You have just now selected a server.

5. If you enter any character in the filter box, the appropriate list of servers owned by the application appears.  Things work normally from this point.

 

When we added the attribute of ref_qual_elements, the appropriate list of servers appears immediately once the application instance field has a value.