Hi,
Sorry if this has been responded already, I did find some posts on the topic, but not explicit.
I'm not sure if I have this right - on a react app, I have this very simply scenario (see .oml) with a list and a detail form.
When saving a new item that has validation errors (a mandatory field in this case):
And then clicking on a previous inserted list item (or inserting a new text), is it standard that the form input validation doesn't refresh automatically?
I know I can set each of the form's input value for .valid and .message to clear these warnings - say - on the item change action. I'm just wondering if I'm missing some automation here.
Thanks!
Nuno
Hi Nuno,
The only thing your action is doing, when you press the name of the record, is set the local variable and refresh the data.
The error message will only disappear if you make that logic on your action (set the valid property to true and set the error message as ""), or if you reload the screen using a destination in your link (see this oml if you have doubts).Let me know if this helps,
Pedro
Nuno Damaso wrote:
Please check below link
https://amit-verma331.outsystemscloud.com/Tests_ND2020/
Hope this will help you :)
- AV
Thanks
The approach you suggested works best with less number of input fields. Could you suggest a solution where there are 50+ input fields in a module? Thanks,
Ojaswi
@Pedro, thanks I see. Hadn't thought of the reload option - definitely an option. The scenario is kind of weird since "Click&Navigate" screens are probably a better design (maybe not for a side panel, idk).
@Amit, thanks! It seems that changing the entity on the left still leaves the validation error in place - but quickly fixed by adding your validation method to the list action link. This works for this case, but I don't know if I would implement this for a large (60+ fields) form with different rules (not only mandatory/input type).
I believe the reason your Form wasn't resetting was because of the 'Built-In Validations' Property of your Delete button. When set to 'Built-In Validations=No' then you've effectively disabled all checking (and resetting) of the form's fields. In this case you are totally responsible for explicitly setting the field to False or True.
When 'Built-In Validations=Yes' then OutSystems will automatically check and *reset* each field's .Valid field according to the Mandatory fields and correct Type rules. The Form's .Valid field will also get reset too.