# Loop through custom state (list)

**URL:** <https://forum.bubble.io/t/loop-through-custom-state-list/72707>\
**Category:** Questions\
**Created:** [November 26, 2019, 9:04pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707 "2019-11-26T21:04:03Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![FJP](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FJP](https://forum.bubble.io/u/FJP)\
**Post date:** [November 26, 2019, 9:04pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/1 "2019-11-26T21:04:03Z")

</div>

Hi there,

Is the following possible with Bubble.

I have a repeating group with checkboxes. Each time I check an item it gets added to a custom state list. Then there is button to process all selected records that are in the custom state.

Use case: I have a repeating group with orders and I want to push the selected orders to an external system using a POST API.

How should I iterate or loop through the items in the custom state list

Thanks!

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [November 27, 2019, 12:10pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/2 "2019-11-27T12:10:32Z")

</div>

API workflow on a list

---

<div class="post-metadata">

**Author:** ![cm1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cm1/32/3947_2.png) [@cm1](https://forum.bubble.io/u/cm1)\
**Post date:** [November 27, 2019, 12:18pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/3 "2019-11-27T12:18:17Z")

</div>

i m looking for the same thing 😃

---

<div class="post-metadata">

**Author:** ![cm1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cm1/32/3947_2.png) [@cm1](https://forum.bubble.io/u/cm1)\
**Post date:** [November 27, 2019, 12:50pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/4 "2019-11-27T12:50:17Z")

</div>

check my post. There is a solution there

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [November 27, 2019, 1:27pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/5 "2019-11-27T13:27:21Z")

</div>

Check out the Toolit kit plug-in. There is an element called for each that will help you achieve that.

Msg back if you need help setting it up

---

<div class="post-metadata">

**Author:** ![FJP](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@FJP](https://forum.bubble.io/u/FJP)\
**Post date:** [November 27, 2019, 2:38pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/7 "2019-11-27T14:38:20Z")

</div>

Thanks all, I will try some stuff out! I will report back the results

---

<div class="post-metadata">

**Author:** ![gnelson](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gnelson](https://forum.bubble.io/u/gnelson)\
**Post date:** [January 13, 2020, 12:04am UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/8 "2020-01-13T00:04:59Z")

</div>

Hi @AliFarahat,

I could sure use that help. I have the toolbox plugin but can’t find what you mentioned.

Thanks,  
George

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [January 13, 2020, 12:35am UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/9 "2020-01-13T00:35:50Z")

</div>

Hey @gnelson

Check out the example here for each

> **[Bubble - Visual Programming](https://bh-showcase.bubbleapps.io/version-test/plugin-toolit-foreach?debug_mode=true)**
>
> 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:** ![gnelson](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@gnelson](https://forum.bubble.io/u/gnelson)\
**Post date:** [January 13, 2020, 12:44am UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/10 "2020-01-13T00:44:59Z")

</div>

LOL. I misread the name of the plugin as another one. I see this one is yours. It’s actually what I was looking for. Thanks for your help!

George

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [January 13, 2020, 2:16am UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/11 "2020-01-13T02:16:25Z")

</div>

While the forEach method will work in some contexts, note that if you’re doing something like firing a workflow only when the previous iteration’s workflow is truly complete, you can use List Shifter’s iterate function.

(The issue being that the “delay” parameter will never be right for all devices in all situations. It will be too short for some devices and longer-than-need-be for others.)

This being said, Bubble in-page workflows themselves are either poorly coded, bugged, or intentionally slowed (which wouldn’t make sense, but is a possibility — is it because of logging? Why do we even need logging for workflows that don’t touch the database?) and even a trivial (or even EMPTY) Bubble workflow takes a measurable time to complete (“why?” we wonder - I guess it’s because logging? 🤷‍♂️).

As a result, iterating over workflows takes longer than it “should”.

If what you want to do is purely computational and in the page, you can use List Shifter’s PROCESS List action which operates at essentially native JavaScript speeds.

At least there are iteration options available. When I started with Bubble there were none/zero/zip.

(Though it’s literally, actually inexplicable that a native/vanilla solution doesn’t exist. It would be excusable if Bubble were truly an array-oriented environment, but it’s not as it’s missing some basic features there.)

---

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jerome/32/80499_2.png) [@jerome](https://forum.bubble.io/u/jerome)\
**Post date:** [January 2, 2021, 5:00pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/12 "2021-01-02T17:00:47Z")

</div>

Hi @AliFarahat,

Is your plugin still available for download, as I can’t find it in Bubbles’ plugin search?

Thanks,

Jérôme

---

<div class="post-metadata">

**Author:** ![AliFarahat](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alifarahat/32/189604_2.png) [@AliFarahat](https://forum.bubble.io/u/AliFarahat)\
**Post date:** [January 3, 2021, 5:37am UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/13 "2021-01-03T05:37:01Z")

</div>

Yes it is. It’s called ultimate toolkit the element is called for each

---

<div class="post-metadata">

**Author:** ![app.hopsi](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@app.hopsi](https://forum.bubble.io/u/app.hopsi)\
**Post date:** [March 7, 2021, 9:06pm UTC](https://forum.bubble.io/t/loop-through-custom-state-list/72707/14 "2021-03-07T21:06:48Z")

</div>

hi @AliFarahat ,

I have an event starting the ForEach. I have a second event executing this ForEach.  
But after the Start ForEach it never goes inside the executing event. I just don’t get why.  
Any hints?  
The ForEach is just a custom state list. The start is triggerend when pressing a button. The executing event is just hiding a panel (to simplify the test).
