15
Views
6
Comments
Solved
Enable button based on checkbox
Question

Hi, can you guys help me on how to enable button base on checkbox? my requirement is, if we just clicked on one checkbox, it can enable the button, my problem is it can only detect the current checkbox(which is the latest data)

This is the table for checkbox, I didn't use a local variable for the checkbox.



Can you guys help me? Thank you.



Champion
Solution

Hello

You can simple do that by checking on a on change action of a checkbox whether checkbox is clicked or not if it is checked then button will be enabled

https://personal-ejuytnht.outsystemscloud.com/TestAppForm/Offices?_ts=638333156817720620

I  have added a demo with sample, let me know if this is what you are looking for

Thanks
Tousif Khan

TestAppForm_Checkbox_Sample.oml

Hello Tousif

This is what I have been looking for ! Thank you for helping me.

Champion

You are welcome :)

I am glad I was able to help 

Best Regards
Tousif khan

Hi Iman,
Using the OnChange Event on checkbox, you can use a listFilter client action (from system) to know if there is at least one checkbox checked and then set a boolean to activate the button.

This pattern is actually already developped in the screen template called Bulkactionswithfilters so I would adivce to check it!


Hi jesse, do i need to put assign on a variable in this on change event? or just leave  it like that? and is it correct on how i do it?



Champion

Hi @Iman Haqem ,

Create one boolean variable inside the screen and now you need to put assignment below the filter action in your above logic if list filter is not empty then make Boolean variable true otherwise false.

Use this Boolean variable inside the enable property of button.

Regards,

Arun

Champion
Solution

Hello

You can simple do that by checking on a on change action of a checkbox whether checkbox is clicked or not if it is checked then button will be enabled

https://personal-ejuytnht.outsystemscloud.com/TestAppForm/Offices?_ts=638333156817720620

I  have added a demo with sample, let me know if this is what you are looking for

Thanks
Tousif Khan

TestAppForm_Checkbox_Sample.oml

Hello Tousif

This is what I have been looking for ! Thank you for helping me.

Champion

You are welcome :)

I am glad I was able to help 

Best Regards
Tousif khan

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