# Workflow sequence de-prioritising checkbox custom state

**URL:** <https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179>\
**Category:** Need help\
**Created:** [August 22, 2023, 8:04am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179 "2023-08-22T08:04:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![usha](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/usha/32/185542_2.png) [@usha](https://forum.bubble.io/u/usha)\
**Post date:** [August 22, 2023, 8:04am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/1 "2023-08-22T08:04:44Z")

</div>

First bubble app here 🙂 Need some help!

I have a list of items (colors, in this case) on screen available for selection. By default it displays all the previously selected colours as selected, and user can udpate them. To save DB calls while changing selection for each color checkbox, I’ve created a custom state that gets updated on each select/de-select action. And then finally it saves this in DB when user clicks on Save.

This works beautifully while in debug mode. If I remove the debug mode, the Save button click seems to be executing before setting the custom state on “G Color clicked” [the checkbox in the repeating group]. And hence it does not update the color selection changes. What am I doing wrong?

Here’s the app: [foo | Bubble Editor](https://bubble.io/page?type=page&name=trials&id=foo-64510&tab=tabs-2)

 ![Screenshot 2023-08-22 at 12.03.16 PM](https://us1.discourse-cdn.com/bubble/original/3X/4/b/4be720dcf03cd0058f541eb01c815ff8816113e4.png)

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [August 22, 2023, 10:33am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/2 "2023-08-22T10:33:00Z")

</div>

Hi there, @usha… your issue is probably the fact that you are adding the color to the list and removing it from the list in the same workflow event. Try using two workflow events with the conditions at the event level, and see if that produces the desired result.

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![usha](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/usha/32/185542_2.png) [@usha](https://forum.bubble.io/u/usha)\
**Post date:** [August 22, 2023, 11:16am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/3 "2023-08-22T11:16:06Z")

</div>

Thanks for checking @mikeloc. I originally had them as two workflow events, I then combined to see if that helps. Split them again now as two workflow events, the issue seems to persist…

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [August 22, 2023, 11:21am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/4 "2023-08-22T11:21:33Z")

</div>

I just ran it as the only user in your database, and it appears to be working as expected. What issue are you seeing?

---

<div class="post-metadata">

**Author:** ![usha](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/usha/32/185542_2.png) [@usha](https://forum.bubble.io/u/usha)\
**Post date:** [August 22, 2023, 11:28am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/5 "2023-08-22T11:28:35Z")

</div>

Did you try it on debug mode? It’s working as expected in debug mode, but not in the non-debug mode:

> **[Bubble - Visual Programming](https://foo-64510.bubbleapps.io/version-test/sign-up)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [August 22, 2023, 11:40am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/6 "2023-08-22T11:40:33Z")

</div>

Ah, okay… I did run it in debug mode, and it does not seem to work with debug mode off, but I have no idea why. Maybe try changing the conditions to check if the current cell’s color is already in the list or not instead of checking the state of the checkbox.

---

<div class="post-metadata">

**Author:** ![usha](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/usha/32/185542_2.png) [@usha](https://forum.bubble.io/u/usha)\
**Post date:** [August 22, 2023, 2:20pm UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/7 "2023-08-22T14:20:59Z")

</div>

Thanks a bunch @mikeloc 👍 It’s working now. In some race condition, sometimes it doesn’t seem to register the checkbox clicks. But I can live with this for now 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [October 31, 2023, 8:05am UTC](https://forum.bubble.io/t/workflow-sequence-de-prioritising-checkbox-custom-state/279179/8 "2023-10-31T08:05:08Z")

</div>

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