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
@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.
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |