How to copy and paste query

kumazo
Tera Contributor

We can copy the query by using "copy query", and get the following sample query.

active=true^u_codeLIKEOPE

Is there any way to paste this query into another instance?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can do this using sysparm_query

1) visit the table.list

2) then in URL do this

/incident_list.do?sysparm_query=active=true^u_codeLIKEOPE

OR

copy the entire URL and just change the instance name and it would take you to the table with that filter condition; provided both the instances have same table and field name

regards
Ankur

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

@kumazo 

Thank you for marking my response as helpful.

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

Regards
Ankur

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

Jaspal Singh
Mega Patron
Mega Patron

Yes it should be fine if you apply to same table or any other table that as active & u_code field

You need to use .addEncodedQuery('paste copied query') instead of .addQuery()