Hi Everyone, I have been trying to achieve a...

(Ankit Android) #1

Hi Everyone,

I have been trying to achieve a functionality using Valid_If, Show_if column constraint but I am failing to achieve it. I will try and explain using an example below which is a snippet of my original form.

I have a form with 2 fields.

Field 1 - Date Field 2 - Text

I have a validation for date field where it cannot be past dated. It has to be today or future. when the value in date field is entered and is validated then I show Field 2 where user can enter some text.

but user still has an option to change value in Field 1. The functionality that I want to achieve is that if the user changes the date field and if it is not validated then the value in field 2 should be initialized or cleared.

When the user enters the correct validated date, then user should enter the text again.

So basically, I need to reinitialize the field if another field (which is a constraint for this field to show) doesn’t have validated values or it has been changed.

Can anyone please help?

(Rosemary Black) #2

Does the text field have a valid if constraint?

You could make the text field valid based on the same date, it wouldn’t clear out automatically but would show as invalid if the date is changed.

You could also change the show if constraint to show if the date is valid, or if it (itself) isn’t blank.

(Ankit Android) #3

@Rosemary_Black I want to clear the text field coz if the date is being re-entered, user should re-enter appropriate text. I am using show if constraint currently but what it does is just hide the field. But if the user re-enters another date which is valid, the text field is shown with the earlier text which might not be correct but since it is valid, it might be oversight.

I want to use a functionality of reinitialize the field if any of the previous field is changed.

(Rosemary Black) #4

@Ankit_Android I can’t think of a way to do this exactly from a form, If you were doing quick edit fields in a detail view, an action and workflow rule could do it for you.