Compare multiple strings in a single operator in Workflow

Hi All,

I need to compare multiple string value in a single “Compare Strings” operator in a Workflow. For example, I need to compare the entitlement name to values EntA, EntB and EntC. Is that possible?

Hi @jasmedina

workflow compare strings is fairly basic as the documentation suggests

I believe you can include logical operators but I have not tried it.

You can create a variable using “Define Variable” and add a variable that has all the values, as comma separated, you want to compare the Entitlement with. (In you case something like “Ent A, Ent B, Ent C”). Now you can use Compare Strings with Comparison operator “contains” or “matches” where Variable A will be the variable you created earlier and variable B is the Entitlement.

Hi Nithesh,

Could you please if this is correct?

Define Variable step:

Compare Strings:

Thank you! :slight_smile:

Value 1 should be $.defineVariable.financeBusinessFunction

May be call it “financeBusinessFunctions”??

Are you expecting multiple values in trigger for Business Functions?

1 Like

My use case is to compare the access profile name
from the access request (I used Access Request decision trigger) - $.trigger.requestedItemsStatus[*].name

to different business functions which contains the values: Finance-G&L Accounting-AMER, Finance-G&L Accounting-APAC, Finance-G&L Accounting-EMEA, Finance-G&L Accounting-GLOBAL which is the $.defineVariable.financeBusinessFunctions

In your case you cannot be sure that the names will be in the same order every time.

What do you intend to do after comparison?

$.defineVariable.financeBusinessFunctions->Contains-> $.trigger.requestedItemsStatus[*].name

In one compare, does this work?

After comparison, I will execute an HTTP Request action to update the recipient of the access request’s identity attribute.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.