How to split a string and extract substring?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 01:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 01:59 AM
Use below code:
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 07:21 PM
Feel free to mark correct, if your issue has been resolved, so it ends up in solved queue.
Will be helpful for others looking for the similar query.
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 03:15 PM
Hi
Is your issue resolved?
Feel free to mark correct, if your issue has been resolved, so it ends up in solved queue.
Will be helpful for others looking for the similar query.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2022 02:05 AM
Hi,
You have to get the short description value into string and the split it by space and get the contact no srting1[3].
Sample scripts-
Object will be GlideRecord/ current
var str = object.getValue("short_description").toString(); // Call Inbound from 01037669762 - ConnectionId: e7541016-1a5a-4c24-9375-0a3f8793e6cc
var string1 = str.split(" ");
gs.info(string1[3]);
Thanks,
Sagar Pagar