I've got a Valid_If expression to validate th...

Iโ€™ve got a Valid_If expression to validate the length of time of a shift and make sure itโ€™s on quarter hours =AND([_THIS] > [Start Time] ,[_THIS] <([Start Time]+(10/24)),TRUE,IN(MINUTE([_THIS]-โ€œ00:00:00โ€),LIST(0,15,30,45)))

It works on chrome, but not on ipad or android. Iโ€™ve tried it without the quarter hours and it still doesnโ€™t work. Locale is set correctly, Iโ€™ve removed he expression and then saved a date to test it. Any ideas? Thanks

0 6 385
6 REPLIES 6

tony1
New Member

@simon_bailey1 Hmm, I would expect it to behave the same independent of what device youโ€™re using. That could be a bug and Iโ€™ll look into it.

You might consider making separate โ€œhoursโ€ and โ€œminutesโ€ fields in your form. The minutes field could be an Enum column with values 0, 15, 30, 45. That would make it easier for the user to enter the time, and would also prevent invalid inputs.

You could then combine the two values in a separate column using an app formula.

What is ([Start Time]+(10/24)) doing?

What is TRUE as the third argument to AND() there for?

@tony the field is date and time and needs to be together as it feeds into other stuff to work out which day theyโ€™re working etc. I can leave that bit out, that just an extra check as I check duplicate jobs, but only each 15 minutes, so itโ€™s handy. It is weird that chrome is fine. Thanks for looking.

+Steve Coile ([Start Time]+(10/24)) is adding 10 hours to the start time, so a shift canโ€™t be longer than that. I donโ€™t know why TRUE is the third argument someone helped me with the expression and it worked. Iโ€™m assuming thatโ€™s not the problem as chrome is working with it in.

@simon_bailey1 the โ€œTRUEโ€ argument is not needed in here. Itโ€™s only needed if you try to use IN expression like IN([_THIS],LIST(0,15,30,45)). This will generate a dropdown where AND(TRUE,IN([_THIS],LIST(0,15,30,45))) eliminates the dropdown list.

Top Labels in this Space