I’m trying to make changes to a list of things.
In the example below, I want to to change the text field “ss” by filtering through a list of options with the same styleId of the thing I’m changing. The problem is I cannot access “This thing” as a data source from the list filter.
Is there a proper way of doing this or is there a workaround?
There is probably an issue with the field, Note that the field in the first image has uppercase “D” while the one in the second image has lowercase “d”.
A. use advanced… on the List filter option
B. Run a “schedule api workflow on a list action”
in the filter for the field ‘ss’ you can see there is the Data Sources section with the first option as ‘parent groups thing’, if you have your button in a group you can set the datasource of that group to be of the type of data that is ‘BaseStyle’s’ so that the Parent Groups thing is a ‘BaseStyle’ and so you can then use the expression for styleId as ‘parent groups BaseStyle styleId’
Yeah this is one of the more annoying limitations of Bubble…
There’s no way to do this using Make changes to a list of things, as Bubble changes the context of ‘This’ once you apply a filter (‘This’ is only available for the item you’re filtering, rather than the root object).
So you’ll need to do it iteratively, by scheduling an API WF on a list (of BaseStyles), and passing the BaseStyle into the WF as a parameter - then you can refer to that parameter in the subsequent filter.
1 Like
That shouldn’t be a problem since “styleId” and “styleID” are both just text fields.
1 Like
The problem is I’m changing a list of BaseStyles each one having it’s own styleID, so I need to filter for the styleID of the particular BaseStyle I’m changing at the moment. Unless I’m misunderstanding you, your solution would work if I was just changing one BaseStyle or if all BaseStyles had the same styleID.
I tried playing around with advanced but I couldn’t figure out an easy way to search for the correct BaseStyle’s styleID without having some reference to “This BaseStyle” which just goes back to the original problem. Do you know of a way?
I’d like to avoid having to do this through a api workflow if at all possible.
I was afraid of that, thanks for your clear explanation.