Currently I'm learning about Form Validation and in OutSystems' lesson it describes this statement,
" The valid property of the Form is automatically set to False, when at least one input field of the Form is set to not valid. This property cannot be explicitly changed in the logic, and is managed automatically by the platform (e.g= Assign)"
I understand everything in lesson except this statement " ... This property cannot be explicitly changed in the logic, and is managed automatically by the platform."
What does it mean by "the valid property cannot be explicitly changed in the logic?" , and why
"Assign" is e.g.?
One of my mates explained, it means the Form1.Valid's "If" cannot be changed ,for example, to "Assign" or something but I don't that is it since it states "the Valid property ..." and how do you mean by "cannot be EXPLICITLY changed." ?
How do you interpret the phrase "explicitly changed" in general? Does it mean as if some image itself cannot be changed?
Hi S H Kim,
it means you can not change the value in your code, and a typical way that would be done is in an Assign. You can only check it's value (for example in an If widget)
So it can not EXPLICITLY be changed, but only IMPLICITLY, by changing the valid property of one of the inputs that are part of the form. This happens by the built-in validations under water, or by your own assign of the valid property of one of the inputs.
so if you find the word explicit hard to understand in this context, you could read is as : it cannot DIRECTLY be changed, but only INDIRECTLY by changing the valid property of one of the inputs.
Or yet another way of thinking, is that the valid property of a form is a derived value of the valid properties of all inputs on the form.
Dorine
Thank you very much for your answer.
But I still don't fully get it since I'm a beginner and a little confused.
Do you mean, in an Assign there is [variable = value] so you can change like [xxx_input = True or False] but in Form Validation If widget you can't set the value of the Valid property?
So, it has nothing to do with [Form.Valid If Widget] itself that appears in the default logic flow on an Screen Action Flow, "The Form.Valid cannot be explicity changed" is a statement that just explaining the general fact of an If widget?
Could you provide an explanation with an example or a scenario?
I sort of get the abstract understanding of your answer but I want to make sure that I'm fully acknowledged.
Thank you
it is the form.valid that is a read-only property for us as developers, meaning that you can't use an assign to change it's value.
The platform keeps it in sync with the valid properties of all the input widgets on it. An input widget can get a valid = false automatically by the built-in validations, or you can Assign false to it if you perform custom validations in your flow.
Any time that in the built-in or your custom validations, one of the inputs get a valid = false, the form will also get a valid = false.
Ah, and as for an example, let's say you have a mandatory firstname and lastname input on your form, and you want lastname to be at least 3 characters.
scenario 1:
scenario 2:
scenario 3:
You are the best Dorine.
I'm deeply thankful to your answer.
You helped me tremendously with my presentation at work.
Thank you very much !