Ajax Refresh for Toggle Button

Hi all,

Wondering if someone could be kind enough to help me with an issue. 

I am developing a web app using version 10 out OutSystems. I am trying to implement a toggle button, which when set to true, it selects a checkbox for a list of records. The variable for the 'select multiple' checkbox is a value within the structure of the list.

I have an on change action behind the toggle. This is looping through the list and setting the value of the checkbox to true and then refreshed the checkbox.


When debugging this action, the structure attribute is definitely being set to true, however, the refresh isn't working. I have tried to refresh different aspects of the container, but still not like.

I feel like I am missing something obvious here.

I appreciate any suggestions.

Thanks,

Asha

Asha Vadher wrote:

Hi all,

Wondering if someone could be kind enough to help me with an issue. 

I am developing a web app using version 10 out OutSystems. I am trying to implement a toggle button, which when set to true, it selects a checkbox for a list of records. The variable for the 'select multiple' checkbox is a value within the structure of the list.

I have an on change action behind the toggle. This is looping through the list and setting the value of the checkbox to true and then refreshed the checkbox.


When debugging this action, the structure attribute is definitely being set to true, however, the refresh isn't working. I have tried to refresh different aspects of the container, but still not like.

I feel like I am missing something obvious here.

I appreciate any suggestions.

Thanks,

Asha

Hello,

Before ajax refresh I think the refresh Data is missing.

Jorge Rodrigues

Hi Jorge,

I tried this but it doesn't make a difference to the result.

Thanks,

Asha

Asha Vadher wrote:

Hi Jorge,

I tried this but it doesn't make a difference to the result.

Thanks,

Asha


Can you send the oml file for me to analyze better?


Jorge Rodrigues


Hi Jorge,

I can't send this as it is a company project. Let's see if anyone else can help me first! :)

Thanks,

Asha

HI @Asha Vadher

I can understand your problem, please you can take a look on this component , in this compomnet you will get  how to select all checkbox and unselect  all , and try to apply the same logic to ur code

https://www.outsystems.com/forge/Component_Reviews.aspx?ProjectId=4292


I hope this helps you,


Regards,

Shree

Hi Asha, 


If you refresh the table, it will have the values initially assigned back in preparation. If you need to keep the current state of the table, you will need to set the list value you get in preparation as the new table value and then refresh it.