- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 06:51 AM
I am trying to use an ifscript to check if a list collector selected values is empty or not. If it's not empty, I will generate tasks based on the selection.
Right now my script looks like this but I see a warning:
Solved! Go to Solution.
- Labels:
-
Workflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 07:13 AM
Try this (typo also corrected on line 2)
answer = ifScript();
function ifScript() {
var accessoriesList = current.variables.accessories.toString(); //convert the variable list to string
var arrayList = accessoriesList.split(",");
if (arrayList.length > 0) {
return 'yes';
} else {
return 'no';
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 06:53 AM
Hi,
There is no script attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 07:06 AM
Sorry about that
answer = ifScript();
var accessoriesList = current.variables.accessories.toSring(); //convert the variable list to string
var arrayList = accessoriesList.split(",");
function ifScript() {
if (current.variables.arrayList.length > 0) {
return 'yes';
}
else return 'no';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 07:13 AM
Try this (typo also corrected on line 2)
answer = ifScript();
function ifScript() {
var accessoriesList = current.variables.accessories.toString(); //convert the variable list to string
var arrayList = accessoriesList.split(",");
if (arrayList.length > 0) {
return 'yes';
} else {
return 'no';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 07:42 AM
It's working, Thanks