Hi,

I have form to fill checkbox, there are 5 checkbox. So  I want to make validation like, checkbox must be fill in at least one. 

Thanks

Hi,

You can check in screen action if any one of the variable has value.

Regards.

Ayu Andini wrote:

Hi,

I have form to fill checkbox, there are 5 checkbox. So  I want to make validation like, checkbox must be fill in at least one. 

Thanks

Hello Ayu Andini,


You can Check if any one of the checkbox is selected in screen action before submitting data to the db, by using "If Else" condition, Attached image of screen action below:


Hope It helps,

Regards,

Tanvi H


Hello Ayu, 


you can do this to manage via if condition in you action. you need to add one if block and pass this condition. please check attach screen shot..   

Hi,

I agree with Jitender Gaur. But don't need to take the local variable to check it. Simply able to check the condition by taking the Form field variable. It will be work fine.


Thank you,

Sudip 

Hello Ayu,


I think you can take one boolean local variable and default value will be false for this variable. You just need to bind this variable to all 5 checkboxes. If any check box get select then in onChange you can change the value of variable. By this way using single variable you can find that any checkbox is selected or not.


Sudip Dey wrote:

Hi,

I agree with Jitender Gaur. But don't need to take the local variable to check it. Simply able to check the condition by taking the Form field variable. It will be work fine.


Thank you,

Sudip 


Hi Sudip, 

Agree with you, I took local variable only for a reference to manage it with a single IF condition. we can also use form filed variable to validate condition.     

Processing Upload...

Hi,

Please check the Oml file. So it will be easy for you to get the solution.

Thank you,

Sudip 

I hope this will be the Simplest solution for it. Please check the Link below,

https://sudip-omne.outsystemscloud.com/checkedbox/

 thank you,

Sudip

check the oml

Solution

Solution