
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2022 08:30 AM
Hi Team,
I have to use Substring function to extract order number from subject of incoming email in Inbound action of type "Record". When to run of type "Reply".
Below is the scrip I wrote to extract order number:
email var sub=email.subject.toString();
var num=substring(sub,'4','16');
gs.info("00xx: "+num);
But I am getting below error message in logs. Kindly let me know how to solve?
com.glide.script.RhinoEcmaError: "substring" is not defined.
sysevent_in_email_action.b6b0cd6d1b12c150f102866ecc4bcbc2.script : Line(7) column(0)
4: var sub=email.subject.toString();
5: //var sysid=email.from_sys_id;
6:
==> 7: var num=substring(sub,'4','16');
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2022 09:00 AM
var num=sub.substring(4,16);
Try this
If its work, mark answer as correct.
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2022 09:00 AM
var num=sub.substring(4,16);
Try this
If its work, mark answer as correct.
Anshu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2022 09:13 AM
Hi Anshul,
Actually I want to extract CSPRJ00000001896 from the string "Re:CSPRJ00000001896"
Please let me know what numbers , I should put in substring?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2022 09:22 AM