I have a backend workflow (= BWa) that schedules another backend workflow.
BWa has a parameter list of text (unique ID of a Data type) the data type varies.
I want to delete the list of things (depending on the datatype), I currently have 2 approaches in mind i need help deciding which is more efficient.
A. Do a search (where uniqued id is in list parameter) and delete the return results
B. create an addition backend workflow and set a parameter (list of things) and trigger it via the api connector, (allowing bubble to auto detect the list of things)
My reluctance with the second approach is that I have to create a new workflow for each Data type i want to delete
Any advice on how to proceed?
Please explain in more detail why there is a list of unique IDs with different data types in that list.
No, on each instance, the list only contains ids of one data type. As i mentioned it’s a server side workflow.
Hmm, I think I misunderstood earlier. So just to confirm — you want to have a backend workflow that can delete a list of items regardless of their data type, right?
In that case, you could use the Data API. You’d set up the call in the API Connector and make the data type dynamic. However, you’ll also need to pass the data type as a parameter in the request.
Here’s a basic example of how I handled this in one of my apps: I created a reusable component — a delete confirmation popup — and then set up an API workflow for dynamically deleting items. In that workflow, I pass both the data type and a list of unique IDs. It worked really well.
Just make sure your privacy rules are properly configured, and don’t forget to enable the Data API too.
That’s exactly how i have been doing it in all my apps, i just wasn’t sure if there is a better way.
Thank you for clarifying