Hi there,
I have several JavaScript activities that retrieve the total record count based on split conditions. Now, I've added another JavaScript activity to extract the segment code from the split activity. Additionally, I'm attempting to access the instance.vars variable within this new JavaScript activity, which was previously defined in the split condition JavaScript activity. However, an error occurs stating that the "Unable to parse the expression"
1st Js Activity: instance.vars.countOfSegment_RecipientEmail = vars.recCount
2nd JS Activity : <node expr={"+instance.vars.RecipientEmail+"} alias="@Segment"/> -
The 2nd JS activity is throwing an error
I have implemented two split activities where I've defined instance.vars. in both. Now, I aim to retrieve and display these instances.vars declarations in a table format of an alert activity as shown below:
Please suggest if there's a more effective method to accomplish this task, or how I can reference instance.vars. in a node expression of query def
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
@rvnth you can put an Enrichment activity between the two JS activities.
Inside the Enrichment, you can pull up the instance variable as a targetData element
$(instance/vars/@countOfSegment_RecipientEmail)
The instance variable will become part of the targetData which you can use in your second JS file to pull out as queryDef and show in Alert
@rvnth you can put an Enrichment activity between the two JS activities.
Inside the Enrichment, you can pull up the instance variable as a targetData element
$(instance/vars/@countOfSegment_RecipientEmail)
The instance variable will become part of the targetData which you can use in your second JS file to pull out as queryDef and show in Alert
Hello!
Just confirming that instance variables (instance.vars.myVar) are global, so it can only contain one value and will be overwritten if declared again.
It's a bit hard to figure this one out without the code from both activities, but I am pretty sure that you pass variables into XML just with {variable}, so
<node expr={instance.vars.RecipientEmail} alias="@Segment"/>
If it isn't just a simple syntax error, I'd need to look at the code blocks to try and help more.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies