- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 12:07 AM
Hi,
I want to get the position of '/' in a text using the glidefunction:position().And then want to use it in substring.
Tried to escape the value but it returns error/garbage value. I cannot use other javascript functions because only basic functions are included in reports.
Code:
glidefunction:substring(category,'0',position('/',category))
Eg. I have string - 'Network Services / VPN / Cloud'
So after the code execution I want to display only - 'Network Services'
How can we do this ? Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 02:40 AM
try this
glidefunction:substring(category, '1', glidefunction:subtract(position('/', category), '1'))
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-13-2025 11:00 PM
Thank you @Ankur Bawiskar the solution worked for me.