Dynamic Checkboxes don't reset properly

I am using checkboxes to show/hide columns in a data table. It uses the following code to determine if the box should be checked. This is working.

There is a workflow with 2 conditions - depending on if the checkbox is checked or unchecked it will add/remove an entry from a list of texts in the user database. This is also working.

I tried adding a workflow that clears the list (to reset the view).

The list clears and the display updates but the popup that lists the checkboxes won’t sense the updated list. Trying to get the boxes that were unchecked to show back up as checked. How can I get them to work properly?

Edit - It just worked once. Then I tested it again and it stopped. I know Bubble can act a little funny around peak times, I am wondering if that is the issue here.

Get rid of the checkbox element and make your own with an Icon and conditional formatting . Then you have much better control and can just trigger workflow(s) when the icon is clicked. In your case you would want two events on the same button, each with opposite conditions so one runs with that text is not in the list, and another workflow when it is in the list.


Yeaaah, I wouldn’t use a checkbox element. Just use an Icon that is an empty checkbox, as Tyler mentioned.

Set a condition that says “When current user’s prefDistrictQueryHidden contains regionCode” → change Icon to checked.

The workflows should have the appropriate only when conditions. Good luck!

Cheers :slight_smile:

1 Like

Thank you for pointing me in the right direction here! Will re-no-code using this approach.

Thank you as well for elaborating on the solution. I will post once I get this working.

1 Like

Reset the inputs at the end of the Workflow.

Workflow When change Checkbox:

  1. add to State (only when is checked) > 2. remove from State (only when isn’t checked) > 3. Reset Inputs

If it is a list, when adding to the State use the value: “[state value] ‘plus item’ [new item]”
(or “minus item” to remove a item)

I will see how to work this logic into the solution.

The state I am saving is a list of texts held in the user database. I did this to persist the values automatically. In the future I will need to save these lists to create the ability to load different column layouts. Also plan to adjust the export function to also sense this and adjust the columns in the CSV export or charts build from it… looking forward to that fun part haha.

Waiting on our custom API to get finished up before finalizing this part of the page, as there is a bunch more columns to add to the display. Currently there are about 40 data points planned for this table ( it is over 4000px wide which has presented layout challenges but we are building a data analysis tool, so this is the spec )

Thanks for taking a look at this. I really wanted to turn this idea over before reworking it as there will be a lot of features coded around this eventually.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.