Thanks for the help.
First place I tried the way you mentioned above, I am just taking the query activity which loads the delivery log information of that perticular delivery and heading with a JS activity to write the counts. Then the alert activity to alert the user with the specific information.
And since this email delivery runs on hourly basis; I wanted to have delivery internal name in the alert activity to move things faster.
When I tried the above method I am seeing it as undefined.
Can you please help me on this.
vars.xxxxx is valid from one activity where it is defined up until the following activity. Could be possible that you had an interim activity in between the two and hence it is undefined.
I just tried what Amit had suggested and it works.
1. The workflow looks like this. Not ideal to your requirement but you can make changes accordingly.
2. Inside the JS code activity, I've defined the variable as suggested by Amit. I'm using the instance variable in my case.
3. Inside the Alert activity, I'm using the workflow exactly how Amit suggested.
4. Executed the workflow and got an email like so.
Thanks for the inputs, but this is hardcoded right, now suppose if i want the delivery internal name of the chosen delivery code in the query condition. How can i get the internal of the delivery code which is used in the query condition.
I tried by taking the targetData.internalName as well but it didnot work out.
Any help please.
There are multiple ways to extract it. As I said, my comment was just to specify how to use the instance variable. rest of the logic you will have to define.
If you are using a query activity which pulls out delivery internal name then inside the JS code activity define a queryDef on temp:query schema to pull the internal name value.
Instead, you can get rid of the query activity altogether and directly use a queryDef on nms:delivery schema to fetch the delivery internal name.