Conditional with a lot of or statements, is there a way to optimize the conditional?

Hi,

We have a conditional in our pipeline where we check the value of a field against a list of 45+ values.
We separate each value like this:

if "AAA-5-AAA_AUTH_ADMIN_USER" in [ciscotag] OR "APF-4-INVALID_ENC_POL_SET" in [ciscotag] etc...

Is there a way to list multiple values more effectively? Something like this perhaps:

if [ciscotag] == ("APF-4-INVALID_ENC_POL_SET"|"AAA-5-AAA_AUTH_ADMIN_USER"|"APF-6-RADIUS_OVERRIDE_DISABLED").

Thanks

You could use a translate filter to test if a value exists in a hash.

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