How best to update Live data post feature update?


I have a feature where users can select their skills. At present, I would only create a ‘skill’ thing if they select it.

For various reasons I’ve made an update where now it will create all skills on registration, and then set the value (y/n).

I only have 28 users so not a big deal, but wondering how I would go about creating the missing skills for people (over 200 ‘things’)? SQL I would just write a script, but wondering the most sensible way to do this in Bubble…

Thanks :slight_smile:

Maybe you’re looking for the Bulk button on the app data page? That allows you to pick one of your API Workflows to run on each item in the database.

So once you add a new field or some required field that wasn’t required before, you create a temporary workflow to run and fill in all the data.

1 Like

Thanks tyler!

1 Like

It sounds like it may involve creating multiple Skills per User? There are a few ways to do that. Sounds like u got the hang of it :grinning_face_with_smiling_eyes:

@tylerboodman returning to this and need some help…

I have a few issues:

Issue 1. I’ve tried creating a Backend workflow, but when I select the ‘Bulk’ button on the data type I want to create lots of, I can’t select any of my backend workflows:

Issue 2. I have 40 Sport Profiles (things), and for each I want to create up to 9 things in my Custom Profile Data table. I’m not sure how quite to build the workflow… I was thinking of using the following logic in the backend API, given it’s a once-off task:

  • For each Sport Profile where role = player in the App Data, loop through 9 create a thing (Custom Profile Data) tasks (each represents a unique attribute I want to create).
  • On each create a thing, there will be an ‘Only when’ condition that searches custom profile data to see if the attribute for a given Sports Profile already exists.

Seems simple enough, but I can’t figure out how to do this - any advice is greatly appreciated

Make sure the backend workflow has a single parameter with the datatype you want to process. If it’s called “Item” then inside the workflow you can reference “Item” as the specific thing in question.

Sounds like the parameter datatype needs to be “Sport Profile”, then it might sounds dumb, but could you add 9 “Create a thing” workflows, each with the condition you want?

Hi Tyler, following is my Backend API Workflow settings… It still doesn’t let me select it in the list of workflows when I select ‘Bulk’

Can you see what I have wrong?

Also, just confirming I don’t select ‘is a list/array’? How do I feed the list of Sport Profiles I want to run the update on (it’s only 40 of 46 that I want to use)?

EDIT: Realised I have to go to the Sport Profile table, not the Custom Profile Data table and I can select it (got confused because I’m creating Custom Profile Data, but looping through Sport Profile)

I also added a conditon to the workflow that says:

Screenshot 2023-10-12 at 9.31.34 am

I assume this means it’ll loop through all and only trigger on the ones where it is true?

your parameter type is “Sport Profile” so in your database Data tab you have to be looking at the “Sport Profile” things.

Then when you hit Bulk, and pick your workflow, it will run that workflow on all Sport Profile database entries.

Make sense? Maybe you don’t want to run it on all Sport Profiles, maybe you want it to be on all "Custom Profile Data"s?

Its like a more durable “Run API Workflow on a list”, the list being the entries in the Data tab :sweat_smile:

Nah, I’ve got it working… I’m running the API Workflow on a list of Sport Profiles, but within the workflow I’m creating Custom Profile Data

Thanks for your hekp.

1 Like

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