Flow Designer IF statement on a Choice List

Andrew Albury-D
Mega Guru

Hi All,

I am having an issue with Flow Designer. I have a Choice box on a table (sc_cat_item) with integer values (1, 3, 5 etc) that I need to compare to an integer field on another table (sys_user). I can't select those fields together in Flow Designer as an "If" statement. 

 

My query should look like this:

IF - Request Item.Item.Approval Level (custom field, choice list) - is Greater Than - Request Item.Opened By.Approval Level (custom field, integer)

I understand I can write a small action that takes the two inputs and gives the output of true/false, but is there something I'm missing in the designer itself? 

Thanks, Andrew

1 ACCEPTED SOLUTION

Andrew Albury-D
Mega Guru

As an update from this, my requirements changed and I ended up creating a new action. One thing to note though is if you have a choice list that isn't being accepted as a different type (e.g. Integer) you can change the input type in your action to "Choice" and reference the list on the table. 

Hopefully in New York the new "In-line Script" on flows will allow us to quickly change the data type of an input and do it on the fly. So excited!

View solution in original post

3 REPLIES 3

Arnoud Kooi
ServiceNow Employee
ServiceNow Employee

If you change the Dictionary Type of Request Item.Item.Approval Level to Integer, so that both side of the comparison are Integer, you should be able do this. Choices linked to the field can stay as is.

Hi Arnoud,

I have created a new field of type Integer and added choices, however it is still not allowing me to add it as a comparison in Flow Designer. In the Data bar on the right of Flow Designer is says "Choice", and if I add that field to a flow designer IF the only options I get are "Is" or "Is not" and the choices.

Thanks,

Andrew

Andrew Albury-D
Mega Guru

As an update from this, my requirements changed and I ended up creating a new action. One thing to note though is if you have a choice list that isn't being accepted as a different type (e.g. Integer) you can change the input type in your action to "Choice" and reference the list on the table. 

Hopefully in New York the new "In-line Script" on flows will allow us to quickly change the data type of an input and do it on the fly. So excited!