Run action once for each item in RG

I’m using a QR code plugin (QR Code Generator Plugin | Bubble) to create a QR code for each item in a repeating group.

Unfortunately, this plugin requires that I do this through a workflow action, which means I have to click on each item in my group to generate the QR codes.

Is there a way to run the action once for each item in the RG automatically?

There are two ways to accomplish what you are trying to do. We can do it on the frontend or the backend. I’ll tell you how to do it on the frontend, but if you need to do it on the backend let me know and I’ll make a follow up post helping you out.

If we do it on the frontend you need a plugin to create a loop in a workflow. I use this one: Simple looper (workflow repeater) Plugin | Bubble

This plugin is fairly simple to use, place the element on screen and then create a workflow of whats being repeated. In your case it would be creating a new QR code and at the end you need to add “run next iteration”. You want to run next iteration only when the current cell isn’t the last cell in the repeating group.

1 Like

This looks great. I’m having a hard time figuring out how to point the loops to a particular element in the RG though.

image

You should be able to use whatever you are using as the datasource for the repeating group at item# current iteration.

RepeatingGroupExample datatype item#This Simplelooper’s Current iteration number

1 Like

The Set State action doesn’t allow an equation for the Element, it must be selected from a dropdown.

The workaround I used is to create a new column in the table and add it directly to the database rather than only displaying it on the frontend.

Ohhh. I apologize I didn’t fully understand your question. That seems like it should work though.

1 Like

@wknepp yes It should :+1:

For author (@brenton.strine) I can suggest 2 variants also, that will help him
Paid : Bubble Iterator - use it when want to show something one by one, very useful.
Free : Looper - used as @wknepp described, also has a client loop if interested :slight_smile:

Cheers :wink:

1 Like

What baffles me is that “much needed” feature is solved with a “one line” pluggin element!

Literaly!

image

This should be a bubble.io feature.

2 Likes

hey @brenton.strine

check this out RG Trigger
you can place it in a repeating group cell, and listen for loaded event :slight_smile:
When the cell is rendered, the event “Loaded” is triggered, and you can do the rest of your job

also thanks @it16,

cheers

1 Like

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