Use List Collector for If Statement in Flow

Erik Nelson
Kilo Sage

Hello!

 

I'm building an application, and in the Flow, need to be able to account for different results in order to generate tasks. In this case, I have 5 total options (A, B, C, D, E) and need to account for the following:

1) Only A is Selected

2) A is not Selected

3) A and any other option is selected.

 

I've tried going through various If statements, but there isn't anything that seems to account for the "A and anything else" combination. I've also tried going through a Decision Table, also to no avail. I'm not looking for a count of items selected (which is what I'm finding searching here), this is specifically "If A and any other option is selected".

 

Any help anyone can provide is greatly appreciated.

1 REPLY 1

Martin Friedel
Mega Sage

Hello,

 

how about using custom Flow Action with a Script step, do all the needed evaluation logic there with a script, then return value back to flow and do the rest there?

 

Official ServiceNow documentation: 

As list collector value is basically a string of values, it can be quite a challenge handle your requirement purely within flow.

 

If my answer helped you, please mark it as correct and helpful, thank you 👍
Martin