Checked state of dynamically-generated checkboxes

I have a Checkbox inside a Container with Dynamic List Behavior. I’m trying to provide the user with a dynamic multiple choice set of options to select from. Checkbox options (value and label) and the user’s responses are all stored in the DB. On load, I set the container’s Dynamic List Items (based on a list of options) however I am having a hard time setting the checked value per option based on other data that has the user’s responses. Where I’m stuck is that Checked State Logic logic seems to me to be where I can set the values programmatically, but this conflicts with the user selecting/unselecting checked values afterwards. How would you bind initial checked values for a dynamic set of checkboxes, while allowing the user to change them afterwards?

Hello @Marc_Chriqui

From slack from you:
Post proposes a solution: https://support.backendless.com/t/dynamically-uncheck-checkbox-component/13713/6. The solution makes sense however it looks a bit complex. It would be great if the platform could provide calls to the component itself in the future, for example checkbox.isChecked = true.

This does not sound like a trivial question, we need to discuss this with the team.

I made it work. I created a list of responseOptions (properties: optionValue, optionLabel) and a list of responses (properties: optionValue, responseValue) in PageData. In Checkbox On Change Event handler, I add/update the appropriate object and in Checked State Logic handler I return the value of the appropriate object, both in responses list. On page load, I simply filled up the responses list with saved responses and everything works. While I made it work, I still think the platform should make is easier to set a checkbox value in a dynamic data binding scenario.

Glad to hear about the successes of our users in problem-solving while using Backendless.

As Vladimir says, we will discuss it with the team in nearest future.

Also, if you have any advice in approaches how will be better to use it we will hear you.

Happy coding!