I noticed that vars.schema returns the targeting dimension name on Javascript Code, but I would like to know if it is possible to find out which is the Filtering Dimension on Javascript Code. Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
It's not stored to vars, no.
Crude approach is to search the workflow's xml, looking for query transition target = your activity, then retrieve [query/where/@filteringSchema] from it.
This can be done in 1 line using E4X filtering, doc here:
Thanks,
-Jon
Hi,
It's not stored to vars, no.
Crude approach is to search the workflow's xml, looking for query transition target = your activity, then retrieve [query/where/@filteringSchema] from it.
This can be done in 1 line using E4X filtering, doc here:
Thanks,
-Jon
Thank you! I will try that! One final question, how do I get the workflow's XML in javascript?
I wrote down the following code to test some filtering, but it didn't work:
var test = instance.activities.jumpout.(@name == "jumpout");
Views
Replies
Total Likes
Nah it's not going to work, instance is 'wppObject' not XML. Have to do it the hard way:
function getPriorActivityByType(activityType) {
for each (var priorActivity in instance.activities[activityType]) {
for each (var transition in priorActivity.transitions) {
if (transition.target === activity.name) return priorActivity;
}
}
}
var priorActivity = getPriorActivityByType('query');
if (priorActivity) logInfo(priorActivity.schema);
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Like
Replies