Getting only first value of list collector in an array
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-17-2024 05:41 AM
Requirement-->In catalog task "affected ci" field need to set same as catalog variables for every task and in every task the ci is different because the number of catalog task is trigger based on number of asset selected in "catalog variables".
issue->I have written script in flow designer to set affected ci... but it is always setting first asset name in affected ci in all task.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-17-2024 08:48 AM
If shortDesc is a list of comma delimited sys_ids, you can skip the array altogether and make your query like this:
hw.addQuery('sys_id', 'IN', shortDesc);
Then change your if(hw.next()) line to a while(hw.next()) and that will cycle through all of them.