This is probably a really easy one, but its driving me crazy!
I have a form which logs customer complaints and there is a date field (set to date only) and a time field (set to time only) to record when the complaint was received.
I want to set a hidden field on the form (BusinessHours) to state if the complaint was logged within business hours, ie before or after 5pm.
I’ve created the following @If statement on the save button but it is not setting the field either way.
You’ve got a couple of issues here. Firstly you’re tying to compare a datetime and a string, which won’t work. Secondly you are trying to use an arithmatic operaton on a string - DateTime comparison. To do this, you need to compare to data types that are the same, along the lines of
When you get your formula working, you will find that it may not totally address the business hours issue. How are you dealing with incidents that get reported at 7:00 AM and business hours start at 8:00 AM?