Hi Guys!I need to display a checkbox on the screen, but I want this checkbox already selected, and if necessary, the user will have to uncheck it. I tried disabling enable, but it doesn't and what I need, could anyone help?
Hi,
The variable attached to the checkbox should have it's default value as True.
Regards
Eu fiz isso, mas quando o usuário tenta desmarcar a seleção não atualiza
Hi Fabiano,
Make sure your checkbox has the Enable property set to True, so the user can check / uncheck the checkbox.
Kind Regards,João
Hi Bruno
I am facing the same issue with the checkboxes, and I have set the default value as true, still when the page loads, the checkboxes are unchecked.
I am using traditional.
Can you please help me out?
Just make sure that the variable binded to your checkbox has the True value.
João Marques, in the case I'm using reactive and I put this assignment inside the On Initialize and but it's not leaving it selected, and when I use an On Render it doesn't let it uncheck and checked the enable property it is true
Hi João
You can set the default value of the Variable True which are you using.
Thanks
Rakhi
Here I have provided demo and oml file please check it once its useful to you or not,
https://www.outsystems.com/forums/discussion/84558/how-to-check-the-values-of-multiple-checkboxes/
Demo link:
https://personal-xyog61l7.outsystemscloud.com/Sam_Demo/Sam_List?_ts=638083842066284125
Thanks,
Ajit Kurane.
On which basis you want to show the check box ? Can you specify it or share some screenshot related your form or whatever you are using to show the check box.
Thanks'Rakhi
in the case I'm using reactive and I put this assignment inside the On Initialize and but it's not leaving it selected, and when I use an On Render it doesn't let it uncheck and checked the enable property it is true
Don't assign the value in OnInitialize or OnRender events. You just need to make the variable's default value as true which is bound the checkbox.
In your case you are binding the attribute's value. However the attribute should have True as a default value set.
Are you assigning the attribute value so firstly make its default value True and then use onclick action to create or update your data, Agreed with Shubham don't assign the value in OnInitialize or OnRender Event.
I managed to understand what I was doing wrong, I switched to On Initializer and then created a local variable, assigning true, before I was assigning the checkbox variable directly with the aggregate variable, creating a new local variable worked. Thanks guys
Hello Fabiano Silva. If I understand your problem correctly, you want the checkbox to appear already selected by default when opening the page. If so, I solved the problem as follows. I'm using an aggregate where the checkbox variable is an attribute of the table. I added a new action in the On After Fech event that is in the properties tab of the aggregate. I added an "if" in this action that verifies if the aggregate list is empty and if so, I set the variable (attribute of the table) of the checkbox to true.