171
Views
8
Comments
Solved
Validation For Input

Hello,

There are validations for input widget to prevent using from continuing. However, if a input widget is embedded in a table, you are not able to validate it anymore. Is there a way to perform validation on input widgets that are embedded in a table? Thank you!

2021-06-02 20-50-04
Márcio Carvalho
Solution

Use javascript to make the input invalid by using the id from the input.

EDIT:

Now using the outsystems logic

Look at this now :)

Check the OML.

Kind Regards,

Márcio

ProductSampleWithJS.oml
2022-03-19 07-12-06
Alec Manabat

You can try adding an event listener like onchange on your input widget and then create an action for the validation you need.

UserImage.jpg
Low Nico

Hello thank you for your suggestion, with the onchange event, I can do the validation but it does not prevent the user from saving the incorrect input. Or is there a way to prevent that?

2022-03-19 07-12-06
Alec Manabat

To prevent saving when the input is invalid, create a local variable that will be assigned to the input validation of the input widget to false in your onchange event.

Hope this helps.

2021-06-02 20-50-04
Márcio Carvalho
UserImage.jpg
Low Nico

Hello, I downloaded the sample oml from  the other post but the assign to set input to invalid is empty. What should the assign look like? Thank you!

2021-06-02 20-50-04
Márcio Carvalho
Solution

Use javascript to make the input invalid by using the id from the input.

EDIT:

Now using the outsystems logic

Look at this now :)

Check the OML.

Kind Regards,

Márcio

ProductSampleWithJS.oml
UserImage.jpg
Low Nico
2024-09-12 02-43-38
Deepsagar Dubey

Hi @Low Nico 

Can you give some screenshots or elaborate it more in which scenario you are facing the issue ? 

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