Validation not occurs in dropdown in reactive web
Application Type
Reactive

Hi,

I'm facing an issue in client side validation in drop down. I have a dropdown inside a list widget. The mandatory property of dropdown is set as true. when I click on ADD record and click on Save, its showing a validation message as "Required field".


when I select one value from dropdown and click on save, its showing valid message.

 I have a button(Reset) to reset the value of dropdown as null value. after resetting the value as null and I click on save, I should get client side validation message as "Required field". but in this case the form is valid and shows "valid" message.

I have attached a sample OML. please refer that and help me to fix it.


Thanks,

Wasim khan S

DropdownValidation.oml

Hi, 

On the click of Reset button the drop down id is set to null but the Form.Valid property is still true that's the reason you are not getting the error message, 

You can set the input_valid property to false inside the reset action and form.valid will automatically set to false and you will get the error message.

Hope this will help,

Regards,

Komal

Hi Komal,


How can I make form.valid as false, in this case.

I tried to set it false but as form contains list and inside that we have dropdown so we are unable to make the valid property of dropdown to false, In this case we have to do it manually like I did in below screenshot,

mvp_badge
MVP

Hi Wasimkhan,

I have updated the shared .oml with the some code changes as per the mentioned use-case.

Implementation Points:

  • Changed local List Variable data type
  • Did some changes in the actin flow as well
  • Introduced a record specific reset button


See this sample screen -> FormValidationTask

Refer to the attached .oml file


Hope this helps you!


Kind regards,

Benjith Sam

DropdownValidation.oml

Hi,

Still I can be able to save the data with null value. when i click on refresh the value is resetting, but when i click on save, Am getting valid message.

mvp_badge
MVP

Hi Wasimkhan,

Please find the attached updated .oml file and also please run your test-case in this sample screen -> FormValidationTask 

Let me know if didn't works for you!


Hope this helps you!


Kind regards,

Benjith Sam

DropdownValidation.oml

Hi,

I don't want to reset all button to clear the list as user have to add new list even in edit case as well. 

Hi Wasimkhan Syed Abuthahir.

Check the oml if it's the expected behavior.

Regards

Gonçalo Almeida


DropdownValidationExt.oml

Hi,

This won't work, when we have cascade dropdown.


regards,

Wasim Khan S

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