Create an array within Launch?
Are variables (in this case an array) created within a rule only local in scope to that time the rule fires? Is there a way to create a persistent array within Launch?
I have a page with a list of documents and a checkbox next to each. A user can select what they want, then press a button at the bottom which basically shares these documents. What I'm trying to do in Launch is each time the user clicks a checkbox, it adds (or removes) the doc item from the array. I'm creating the array in the rule but checking for its existence. So the rule fires, I got the document name and I can push it into the array. The problem is the array keeps getting created despite checking for it. So either my js is wrong or the array gets removed at the end of the event.
Here's the relevant js:
if (!docs) {
var docs = [];
docs.push(filename);
console.log("new " + docs);
} else {
docs.push(filename);
console.log("exists " + docs);
}
I'm trying to do this rule without developer support or changes on the code side, as they're not very cooperative at the moment.
