- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 02:48 AM
I'm trying to format an inbound email action to make the description more readable.
what I'm trying to do is change the format from the 1st screenshot of how the email comes in
but want to add a return to look more like the second below by adding a return and wondering the best way to approach this.
requestedUserEmail: a.saager@wellcome.org
requestedUserName: Alex Saager
reason: /
Kind regards
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 03:05 AM
HI @Alex Saager1 ,
I trust you are doing great.
To make it more readable you can firstly split it with the spaces it will give the array of 6 elements .
Then you can join 2 and go on, please find below code snippet which I have tried.
var a = "requestedUSerEmail: ami@gmail.com requestedUserNAme: amit requestedUSerId: AMIT123";
var aArray = a.split(' ');
var finalString = aArray[0] +" "+ aArray[1] +"\n"+
aArray[2] +" "+ aArray[3] +"\n"+
aArray[4] +" "+ aArray[5] +"\n";
gs.info(finalString);
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 03:05 AM
HI @Alex Saager1 ,
I trust you are doing great.
To make it more readable you can firstly split it with the spaces it will give the array of 6 elements .
Then you can join 2 and go on, please find below code snippet which I have tried.
var a = "requestedUSerEmail: ami@gmail.com requestedUserNAme: amit requestedUSerId: AMIT123";
var aArray = a.split(' ');
var finalString = aArray[0] +" "+ aArray[1] +"\n"+
aArray[2] +" "+ aArray[3] +"\n"+
aArray[4] +" "+ aArray[5] +"\n";
gs.info(finalString);
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 01:45 AM