List Collector in Service Portal displays duplicate values

cfran5991
Kilo Expert

I have some List Collectors on catalog items that reference a user table. Many users have the same name, so when they type the name and select one, they wont know if they have selected the right person or not. This was not a problem in the old catalog because OOTB when you selected their name, it would show additional details beneath the list collector.

The only way I can think to fix this would be to do something like add an onChange client script that populates a read only string field beneath the list collector, which could populate a unique identifier (like their email address) for the selection.

Is there a better alternative to fix this problem?

Thanks

1 ACCEPTED SOLUTION

Steven Parker
Giga Sage

We had a similar situation where we had a list collector for Applications users could choose.   The portal doesn't show details like the OOTB ITIL view does so I did the following:



- Created a new hidden Reference field called "Last App Name" and pointed it to our Application List table


- Wrote an onChange client script to write the last app chosen in the list collector array to this hidden "Last App Name" field


find_real_file.png



- Created a new Single Line Text field called "Application Details"


- Then wrote another onChange client script to pull the "Description" column from our Application List table for the app in the "Last App Name" field and write the description to the "Application Details" field which is a read only field through UI policy.


find_real_file.png




So basically if they choose 1 or multiple apps...the description for the last one chosen is shown in the "Application Details" field.   Obviously you could do the same thing for users and write the email or whatever to the read only details field.   You may not even need the first onChange, but using a list collector they may choose multiple people so might be best.   Also, I just added the application description, but you could get multiple fields if needed and write them to a multi line text box too after combining them together.   All kinds of things you can do once you get it working with 1 field.



Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Francis,



Out of the box when some record is clicked on left hand side of the slush bucket the information is shown below for that record.


Did anyone hide that


can you check any client script which is hiding that information through DOM manipulation.



Regards


Ankur


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

The Service Portal renders the list collector like this:


Compass - Create Distribution List_2017-08-07 09-55-52.png


There is no left and right hand side, like on the ITIL view. Sadly there is also no additional information that gets rendered under the selection when you choose it.



Steven Parker replied below with what he did, which is what I think may be the only solution. Hopefully ServiceNow can enhance/fix this in the future, so it behaves more similar to how the ITIL view renders it.


Steven Parker
Giga Sage

We had a similar situation where we had a list collector for Applications users could choose.   The portal doesn't show details like the OOTB ITIL view does so I did the following:



- Created a new hidden Reference field called "Last App Name" and pointed it to our Application List table


- Wrote an onChange client script to write the last app chosen in the list collector array to this hidden "Last App Name" field


find_real_file.png



- Created a new Single Line Text field called "Application Details"


- Then wrote another onChange client script to pull the "Description" column from our Application List table for the app in the "Last App Name" field and write the description to the "Application Details" field which is a read only field through UI policy.


find_real_file.png




So basically if they choose 1 or multiple apps...the description for the last one chosen is shown in the "Application Details" field.   Obviously you could do the same thing for users and write the email or whatever to the read only details field.   You may not even need the first onChange, but using a list collector they may choose multiple people so might be best.   Also, I just added the application description, but you could get multiple fields if needed and write them to a multi line text box too after combining them together.   All kinds of things you can do once you get it working with 1 field.



Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Thanks! I was hoping for some alternatives to this approach, but considering you came to the same resolution as I was thinking would be required to get this done, this may just be what I have to do.