I have a duration work hours field with a validation in place but the validation doesn’t trigger. I created another field to see what the duration result is and it shows 0 which should fail the validation.
What am I missing? A million thanks
I have a duration work hours field with a validation in place but the validation doesn’t trigger. I created another field to see what the duration result is and it shows 0 which should fail the validation.
What am I missing? A million thanks
Does it allow you to save the record?
I’m thinking that because you’re trying to validate a calculated value, it won’t evaluate until you try to save. Getting the invalid error immediately in the form would require a manual input, which isn’t possible for a calculated value.
If you need the immediate error display, then I’d suggest validating on the “End Date Time” column. That makes more sense to me anyways, since it more clearly shows where the user needs to change something.
Thanks Marc you’re right the validation triggered on Save and not before.
Looks like this caused an issue when the initial record is appended. I’m using an add row action to insert the initial records into the table so users can then update the time stamps etc. The action fails of course due to the validation (total hours >0).
Is there a work around for this scenario? I thought to add a field to the table like “record type” to distinguish between a manually entered record vs appended record. Validation would be something like "if record type = Append, “”,Total Hours >0). Would prefer not adding the new field. Any ideas?
Thanks so much Marc!
EDIT: on second thought that probably won’t work for triggered Actions, only for Bots. I’m not sure right now, sorry, busy…
You could try
Valid_If =
IF(
CONTEXT("Host") = "Server" ,
TRUE ,
#original-valid_if-here#
)
Depending on where/how your “append” Action is happening, the above might work, definitely try it still. If not, you can certainly use a similiar approach, just change the CONTEXT... portion of the expression to something else, like to check against the “record type” that you mentioned as a possibility.