Check if value exists in array

Hello.

I have this workflow and want to check if the current day (ddmm format) exists in an array with other defined days as ddmm.

Basically the concept is i want to check if the current day is a day off according to an array of values.

I managed to create something like that but i can’t check the value of the current day to that of values in the array.

Can i check it without split batch function?

Thank you.

Hey @Mulen,

Give this a bash, What I have done is dropped the itemlist node and used the array as it is and used the indexOf method which returns -1 if it doesn’t exist and the array index (0+) if it does. So if this value is 0 or more we know it is a day off and anything else would be a normal day.

Example Worklfow
1 Like

Thank you very much @jon it works.

1 Like