890
Views
7
Comments
Validation inputs inside a list record
Question
Application Type
Reactive

Hello,

And I have a list with inputs to be able to create, edit and delete a record, like an editable table.

How can I add built-in validations to inputs of the form that is inside a table?

I can't access the input.valid and validmessage to customize a message

The idea is when I click on "save" for each row and the mandatory fields are not filled, a message is supposed to appear below the "Required filed" input. is it possible in a reactive application?

Thank you

2018-06-05 16-54-03
Maria da Graça Peixoto

Hi! 

The form you have is in a webBlock?

If not you can try to build a webblock and put the form in that webblock and the webblock in the line. 

Stay safe

Graça

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Rita,

I think you mean something like

Form

+-- List

     +-- Inputs for one of the items in your collection

+-- Save Button : for saving all changes at once


You are right, the inputs in your list are not available in the code as widgets, so you can't reach their valid and validationtext properties.  

You could probably imitate some of the behaviour you want with some sort of webblock wrapping your inputs, and inside the webblock you can update the .valid and the .validationmessage, but that could get real messy real quick.  So the question is do you or your users want this bad enough to invest some time into figuring it out...

Dorine



2024-10-25 09-14-42
Christopher Bautista

Hi Rita,

Good morning!

As mentioned by Maria and Dorine, the way with this is via a webblock.

Can you share an OML for us to have a better picture?

Thank you and kind regards,

Chris

2026-02-05 15-36-36
Lenon Manhães Villeth
Champion

Hi, friend!

I already did some like this. What you can do is:

1) Create a simple block with the input field. The list values will be represented by the input block

2) The onchange action of input will trigger an event to fill the variable on the father element.

3) The save will iterate the list to check if all values are filled and if not, set the parameter to the block to false

I can't remeber exactly what have i done but was something like that


Kind regards

2023-03-09 17-04-45
Nivaldo Pereira
Champion

Despite being an old question, I believe that others may have the same question. I believe that this asset is what is wanted: 

https://www.outsystems.com/forge/component-overview/13879/listvalidation

2022-10-18 07-32-49
Randall Jodache Chetty

Thanks for sharing 


2025-08-07 06-30-56
Amit J
Champion

we can also try below  @Rita Silva 

$public.Validation.setWidgetAsInvalid(widgetId,validationMessage)

$public.Validation.$public.Validation.setWidgetAsValid(widgetId)


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.