Characters that cannot be used in "sysparm_query=" of "g_navigation.open" Part 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 08:03 PM
The following questions give you an idea of the strings that cannot be used.
A new problem has occurred.
I found that even when I use "encodeURIComponent", if the field value contains a "^" it is not reflected correctly.
I know that "^" is a symbol used to connect fields in a query.
Is it possible to use this symbol as text in a field value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 08:22 PM
yes if field value contains ^ then it might cause an issue.
I believe you cannot safely use ^ in a field value when passing it via sysparm_query because ServiceNow will always treat it as condition operators.
something like this might work if you want to send that symbol as field value
g_navigation.open('incident.do?sys_id=-1&description=' + encodeURIComponent('test^value'));
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
06-08-2025 11:16 PM
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 11:20 PM
Glad to help.
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
06-09-2025 08:21 PM
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