Hi All,
Example of my SOAP Push Event payload:
<ctx>
<information>
<paragraph>Lorem Ipsum One</paragraph>
<status>red</status>
</information>
<information>
<paragraph>Lorem Ipsum Two</paragraph>
<status>yellow</status>
</information>
.
.
.
N
</ctx>
Inside the RT Email Template, I want to fetch and validate value for node status for each rtEvent.ctx.information and display the value within node paragraph.
For example if status = red, then display "Alert" and so on.
Expected Output:
Lorem Ipsum One - red - Alert
Lorem Ipsum Two - yellow - Warning
and so on
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Anushka_RK,
You can do it like this:
var infos = rtEvent.ctx.information;
for each (var info in infos){
if(info.status.toString() == "red"){
//alert
}
if(info.status.toString() == "yellow"){
//warning
}
}
BR,
Ishan
Views
Replies
Total Likes
Hello @Anushka_RK
Did you try this?
rtEvent.ctx.information.paragraph
rtEvent.ctx.information.status
You can use conditions for alert like this
if(rtEvent.ctx.information.status=='red'){
PRINT ALERT HERE
}
Views
Replies
Total Likes
Hi @_Manoj_Kumar_ ,
Thank you for your response.
Yes, I tried this. But the <information> node is dynamic and the number of information nodes might vary each time.
How can I pull all the details for each <information> node?
Kind Regards,
Anushka RK
Views
Replies
Total Likes
Hi @Anushka_RK,
You can do it like this:
var infos = rtEvent.ctx.information;
for each (var info in infos){
if(info.status.toString() == "red"){
//alert
}
if(info.status.toString() == "yellow"){
//warning
}
}
BR,
Ishan
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies