|
Post by jonass on Mar 4, 2021 14:45:46 GMT
Hi
Is it possible to check a variable against multiple values? Below doesnt work, but that shows what im trying to accomplish.
If Department is Finance or Devs or HR Do this
<ActionGroup Name="Department" Condition='"%Z_Department%" = "Finance,Devs,HR"'>
Reason is that some of our departments share the same apps, so if this is possible then it would greatly cut down on the code and also make it easier.
Regards Jonas
|
|
|
Post by Teknowledgist on Mar 4, 2021 17:48:32 GMT
At a minimum, you could do this:
<ActionGroup Name="Department" Condition='"%Z_Department%" = "Finance" OR "%Z_Department%" = "Devs" OR "%Z_Department%" = "HR"'>
but this might be easier:
<ActionGroup Name="Department" Condition='InStr(",Finance,Devs,HR,",",%Z_Department%,")'> The extra commas may not be needed in your case but would allow for a department name being a substring of a larger department name. E.G. you don't want a department named "search" to be matched into "research".
|
|
|
Post by jonass on Mar 5, 2021 10:09:14 GMT
Thank you so much!
This works
<ActionGroup Name="Department" Condition='"%Z_Department%" = "Finance" OR "%Z_Department%" = "Devs" OR "%Z_Department%" = "HR"'>
InStr doesnt work for some reason, but this is fine.
Regards Jonas
|
|