- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 11:11 PM
Hi All,
In my first run script activity have a scratchpad variable(workflow.scratchpad.msgFinal) where i am storing a result. Please refer below
After this run script activity i have a notification activity where i am printing the scratch pad variable in body of the mail. And it should be look like below. Bold & Underline. I have used <b> tag and <u> tag in runscript. But am not getting bold and underline format.
Is this can be achievable only by notification script?
Regards,
Sirraj
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2020 01:15 AM
yahh , tested it can be used, <b> and <u> can be set using run script activity as well.
lets do one thing, would it be possible if you can break your string and hardcord some text and see if its setting correctly format or not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 11:19 PM
best way would be email script. try with email script that will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 11:28 PM
Within run script it is not psbl? Because i am checking some 4 vcenter servers to delete snapshot by iterating one server one at a time.
It would be easy if i do all the formatting operations in run script activity and i ca directly send scratchpad to notification
Regards,
Sirraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 11:30 PM
Hi,
for formatting the text you need to use email script
Are you saying you want to send the formatted text from the run script while triggering event queue
You can send the formatted text via gs.eventQueue() in either parm1 or parm2 and then use that in email script
Can you share the script you are trying?
Regards
Ankur
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-02-2020 12:13 AM
Hi Ankur,
So the requirement is i need to delete snapshots in vmware vcenter server by orchestration. I have 4 servers. I will send one and get output and stored in (var result).
Please refer the comment part for better understanding.
var currentVcenter = workflow.scratchpad.vCenterName;
//Holds the current vcenter
var result = workflow.scratchpad.testoutput.returnValue;
//Hold the result of current vcenter
if (result.indexOf("There are no snapshots") == -1) {
workflow.scratchpad.msgFinal += "\n" + "\n" + "<b> <u> Snapshot Report For " + currentVcenter + "</u></b>\n" + "\n" + result;
} else {
for (var i = 0; i < result.length; i++) {
workflow.scratchpad.msgFinal += "\n" + "\n" + "<b> <u> Snapshot Report For " + currentVcenter + "</u></b> \n" + "\n" + result[i] + "\n";
}
}
workflow.scratchpad.counter++; //increasing my counter to feed V2
var loop;
var counter = workflow.scratchpad.counter;
var listSize = workflow.scratchpad.ablength;
if (counter < listSize) {
loop = true;
} else {
loop = false;
var value = workflow.scratchpad.msgFinal;
value = value.substring(9, value.length);
workflow.scratchpad.msgNotify = value; //Once all iterations done this wl holds result for all 4 vcenters
}
workflow.scratchpad.loop = loop;
*****************************************************
So now msgNotify has all my outputs to be printed in notification. Please refer below logs. If i send the below output (whole content) to mail script, how can i format.?