how to populate a list collector to only show assets with a specific po number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 05:43 PM
i need to build a single line text and a list collector in the single line text i would put a po number and the behaviour would be to only show the list of assets with the same po number in the list collector.
I spend multiple hours but i cant figure out a way to make this work on core ui and service portal as list collector dont behave the same way thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 07:45 PM
Hi @flsn2
You can apply an advanced reference qualifier to the list collector variable so that it exclusively displays assets associated with the specified PO number. A suggestion, instead of asking the users to put PO number in the single line text, you can make the field type as look up select box and ask them to select from the existing PO list. It would reduce the manual errors.
javascript:"<PO Field name>="+current.variables.<single line text variable name>;
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 08:09 PM
it should be simple as this in list collector reference variable
ensure you give the correct field name from that table to search and correct variable name
Example: I took alm_hardware table which has po_number field in it
javascript: 'po_number=' + current.variables.firstVariable.toString().trim(); // give 1st variable name
Ensure you add this in variable attributes so that reference qualifier works fine
ref_qual_element=firstVariable
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2025 09:03 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader