- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 06:30 AM
Hi,
I need to access the list collector variable in workflow approval script. Usually I create a workflow variable for each catalog variable and access it as workflow.variables.variablename.
In case of list collector how would I access the values in it since it has multiple values.
Regards,
Karthik
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 07:05 AM
The list collector delivers its selections (what is moved to the right list collector box) into an array. To access the information you would need to parse through the array. I've included an example that I use in a workflow below, also including one where I set it to a string and comma separated values.
current.variables.list_collector_name //will give an array
current.variables.list_collector_name.toString(); //will give string with comma separated values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 07:05 AM
The list collector delivers its selections (what is moved to the right list collector box) into an array. To access the information you would need to parse through the array. I've included an example that I use in a workflow below, also including one where I set it to a string and comma separated values.
current.variables.list_collector_name //will give an array
current.variables.list_collector_name.toString(); //will give string with comma separated values