Hi all,
I have a ask where i need the variable code to get the label of the list activity in alert (such as <%= instance.label %> ), without passing any variable in the list activity.
Thanks in advance,
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @fgtrrt ,
To get the label of the List activity inside the alert activity's body email, Please use the below Javascript Code inside the Alert activity :-
<%
logInfo(instance.activities.readGroup[0].label)
vars.labelReadList=instance.activities.readGroup[0].label
%>
<p></p>
<p><%=vars.labelReadList %></p>
<!-- to print label of read list activity --!>
Hope this helps.
Regards,
Pravallika.
Try this:
instance.activities.alert[0].label = "X"
Is this what you pretend? I don't understand your problem at all
Hello @fgtrrt , to get the label of the alert activity you can use
instance.activities.alert[0].label
With this, you can use it to save it in a variable:
In the Js code:
logInfo(instance.activities.alert[0].label)
vars.labelAlert=instance.activities.alert[0].label
With that in the variable vars.labelAlert you can use it in a query like this:
Hope this helps!
Views
Replies
Total Likes
Hi @fgtrrt ,
To get the label of the List activity inside the alert activity's body email, Please use the below Javascript Code inside the Alert activity :-
<%
logInfo(instance.activities.readGroup[0].label)
vars.labelReadList=instance.activities.readGroup[0].label
%>
<p></p>
<p><%=vars.labelReadList %></p>
<!-- to print label of read list activity --!>
Hope this helps.
Regards,
Pravallika.
Hi @LakshmiPravallika ,
Am getting undefined as an alert. Is there something am missing to add in read list activity?
Thanks,
Views
Replies
Total Likes
Hello, @fgtrrt. Following @LakshmiPravallika's solution, I've tried the same but instead of writing
<%
logInfo(instance.activities.readGroup[0].label)
vars.labelReadList=instance.activities.readGroup[0].label
%>
Inside the HTML content, I've used that code inside the Initialization script of the alert:
This solution worked for me. I hope this helps.