- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We have a scoped app where a person fills out a Record Producer on the Service Portal, and it populates a record in a custom table. That part works fine. But we are creating a flow that does various things when the record is first added to the table, and are having issues creating an IF statement. Basically, we have a List Collector field where the user can enter multiple values. If a "certain" value is selected from that list, we would like the flow to update another field with some information it looks up.
We have this working correctly on a few fields whose data source is another custom field. However, we have a few instances in which the List Collector's data source is from the sys_choice table. And we cannot get this one to work properly.
First, here are what the key data elements in the sys_choice table look like:
(there are actually 17 in all, but these are just the first few)
And here is how the field in the Custom Table is set up (note the field type is "List"):
The field works properly - I am able to select multiple values to this field.
However, If I try to create an IF statement in a Flow based of this field, I do not get a "contains" option like I do for my List Collector fields which are pulling from custom tables. This is what I see:
As you can see, there is no option for "contains".
I know I could probably create a custom table of all the options, and use that as the data source instead. But there is already a lot of historical records out there, so to make those sort of changes would be problematic to the existing records. So that is really not a good option in this case.
How can I get this to work, so my IF statement can look for one particular value among all the selected values for this field?
Thanks
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
OK, nothing was working, so I came at this in a different manner. I had created another Custom Action a while back that converts List Collectors to Strings. So I ran that against the table field. Then when I tried to do an IF statement on that converted value, I had access to use CONTAINS, and accomplish what I need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
OK, nothing was working, so I came at this in a different manner. I had created another Custom Action a while back that converts List Collectors to Strings. So I ran that against the table field. Then when I tried to do an IF statement on that converted value, I had access to use CONTAINS, and accomplish what I need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Very odd. I just got the email from your reply of last Thursday. I had another question with the same behavior. Maybe they were having email or system issues...
Anyway, we abandoned this approach and decided to go another route.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can create a Boolean type Flow Variable and then use "Set Flow Variables" flow logic to set the value as true/false based on your script
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader