I’ve tried using the OnChange event, but I’m not sure how to clear the validation error dynamically for inputs inside the TableRecords widget. Any guidance or examples would be greatly appreciated!
To give a more accurate example I need more context.
Meanwile I suggest add to the list a IsMandatory parameter.
On my exemple I created a struture with all parameters and one is InMandatory. Create a local variable with the type list of that structure.Drag the list component and a set the source.
Then create a weblock that will receive the record as input and drag into the list widget.
Inside of the weblock set the attribute Mandatory of the input with the value from the input
With this approach you have a dynamic validation of the input.
Regards.
Gonçalo Almeida
Hi Goncalo Almeida , Thanks for your suggestion.
I'm working on a feature where I have a table with 4 columns, and all fields in the table are mandatory. Initially, there are no rows in the table. I’ve added a button labeled "Add Row" that dynamically adds a new row to the table.
Here’s the functionality I want to achieve:
I know this can be implemented easily in a form using Widget IDs for validation. However, I’m unsure how to implement this logic for a table where rows are dynamically added and each field needs its own validation.
Could anyone please guide me with:
Any step-by-step guidance or examples would be highly appreciated.
Thanks in advance!
Hi @Neha Singh! This isn't a dynamic approach but you can try this:- Add an attribute to the input widget like this. You can change it to class if you want to:- Add an OnChange event in the widget:
Hi Lady Diane Prado,
Thanks For your time, With the help of Form we can do this I know but the thing is I want for List. Could you please suggest me for dynamic Table?
Thanks in Adv!
Hi @Neha Singh!, can you share your OML to provide a better solution? Thanks!
Please check this oml so may be you'll understand
Thank You Goncalo Almeida!
Because of this I got one Idea and I solved my problem
Hello @Neha Singh
Sorry for the late response
Glad I could help you.
Meanwhile I check your oml and I did some changes.
Check if it according what you want.
Regards
Hello Gonçalo,
Thank you for getting back to me, and no worries about the timing! I really appreciate your help.
I’ll take a look at the changes you made to the OML..
Thanks again for your assistance!
Best regards,
Neha Singh
Hi Neha Singh,
When we set the built-in validation for a button to "No," clicking the button does not trigger checks for required fields, data types, or other validations.
Refer to the documentation for more information about form validation.
https://success.outsystems.com/documentation/11/building_apps/user_interface/forms/validate_the_fields_of_a_form/
Thank you for your time but I want for Table list not for form
Would you mind setting all entity attributes to "Mandatory" as "No" and also ensuring that the input boxes inside the table have "Is Mandatory" set to False? Thank you!
But I want that this field will be mandatory that's the problem. That's the only requirement.
Mandatory Field error message I need to remove automatically after typing on each field
Hi @Neha Singh ,
see this earlier reply, it was for a list, but I'm assuming you can do similar thing in table.
Dorine
Hi Dorine Boudry,
But that's an lengthy process , because let's suppose if I've to apply on 100 of Table's then I've to go for each table and I've to apply this and it'll take lot of time to do this...
if it's possible in other way to do this then please let me know
Thanks in adv!