- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 09:33 PM
Hi all,
I am trying to add Encoded query with sys_created_on before 24th jan
gr.addEncodedQuery('state!=3^assignment_group=207449d2dbae7700a1385d87f49619d4^active=true^sys_created_on<javascript:gs.dateGenerate('2022-01-24','00:00:00')');
I am getting parsing error, unexpected token 2022. Can any1 help me how to resolve this parsing error?
Regards,
Gayathri
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 09:36 PM
Hi,
use double quotes here
gr.addEncodedQuery("state!=3^assignment_group=207449d2dbae7700a1385d87f49619d4^active=true^sys_created_on<javascript:gs.dateGenerate('2022-01-24','00:00:00')");
you can form the query on table list and then copy that query
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 09:36 PM
Hi,
use double quotes here
gr.addEncodedQuery("state!=3^assignment_group=207449d2dbae7700a1385d87f49619d4^active=true^sys_created_on<javascript:gs.dateGenerate('2022-01-24','00:00:00')");
you can form the query on table list and then copy that query
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader