how to populate a list collector to only show assets with a specific po number

flsn2
Tera Expert

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

3 REPLIES 3

J Siva
Tera Sage

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&colon;"<PO Field name>="+current.variables.<single line text variable name>;

Regards,

Siva

Ankur Bawiskar
Tera Patron
Tera Patron

@flsn2 

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&colon; '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

AnkurBawiskar_0-1746328133522.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@flsn2 

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.

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