DavidGonzales
5 years agoQrew Member
OR in a Custom Data Rule
Hello...not the most experienced person with QuickBase, but I am trying to build a Custom Data Rule to prevent any employee from entering a time not in our current work week. It works fine, until I add the OR statement to allow me OR my manger to be able to make an older entry. (It works fine if I only name one of us, but fails with both names. The first part with the End and Start times works fine also.)
If([End Time]<[Start Time], "End Time cannot be before Start Time",
[End Time]=[Start Time], "End Time cannot be the same as Start Time",
not IsUserEmail("david@example.com") or not IsUserEmail("jason@example.com") and
([Date]>[Test Date] or [Date]<[Test Date]-Days(7)),"Date must be in current work week")
What am I missing? Probably just a set of () somewhere. But I can't figure it out. Any suggestions?
Thank you!
------------------------------
David
------------------------------
If([End Time]<[Start Time], "End Time cannot be before Start Time",
[End Time]=[Start Time], "End Time cannot be the same as Start Time",
not IsUserEmail("david@example.com") or not IsUserEmail("jason@example.com") and
([Date]>[Test Date] or [Date]<[Test Date]-Days(7)),"Date must be in current work week")
What am I missing? Probably just a set of () somewhere. But I can't figure it out. Any suggestions?
Thank you!
------------------------------
David
------------------------------