Is there a plugin that simply searches for a Thing or list of Things, and returns it?
Then that Thing or list would be available using the Step X reference in later steps.
Is there a plugin that simply searches for a Thing or list of Things, and returns it?
Then that Thing or list would be available using the Step X reference in later steps.
What are you trying to do, and why do you need a plug-in for that?
Sometimes I would like to re-use a complex search.
This approach would make that easy.
Thatâs what custom states are for (or groups/repeating-groups)âŚ
I was imagining something that is inline in the workflowâŚ
âŚwould you say more about your proposal?: âThatâs what custom states are for (or groups/repeating-groups)âŚâ
Set a custom state and then refer to that in the rest of the workflow (or set a group or RGâs data source - either as part of the workflow, or before - then refer to that)âŚ
You could also use âmake changes to a thing (or list of things) âŚ. But you will be charged the WU for making those changes, even if you donât actually make any changes⌠so thereâs really not much point in doing that.
While what @adamhholmes says is true â we donât need an inline Action that evaluates some expression and forwards it to a âresultâ output â it would actually be a nice thing to have.
If the client-side Action plugin API supported returning values to the workflow, such an Action would already exist.
Note that the server-side Action plugin API does support returning values and so I have some SSA plugins in my âList Popper and Friendsâ plugin collection that do this. But they are for server-side only and should not be used client-side for this purpose (as [1] cold start times are high and [2} WU consumption for this in the client-side is pointless).
But yeah, âworkflow variablesâ would be a nice quality-of-life thing. This isnât such a huge pain as it used to be (one can dynamically create custom states when doing Set State, which in ye-olden-days was not possible, forcing you to go back to design mode to add a Custom State and then return to your workflow to use it).
one option is to use a custom event. add a parameter that will hold the search, trigger it from the main workflow and reference the parameter anywhere in the custom event.
Thatâs a good workaround as well, @dorilama! Didnât occur to me.
Thank you all for the suggestions!
I have never used States that wayâŚbut it seems obvious now. Hah! Thanks again @adamhholmes!
@dorilama Thank youâŚI had never thought of that way to use a custom event either!
@keith Yes, âworkflow variableâ is what I had in mindâŚhopefully near-future plugin enhancements will allow for this!
Yeah⌠@gaharrington⌠I was also going to mention⌠if doing this in a backend workflow then using @keithâs List Popper & Friends Flow State SSA (single or list) actions is definitely the way to go⌠(as there are no custom states in backend workflows)âŚ
But I understand what youâre getting at - and yeah it would be handy to be able to set variables within a workflow and refer directly to them in subsequent steps in the same workflow (although that is really what custom states are, in a round-about sort of way) - but I guess thatâs just not the Bubble wayâŚ
And I also use Custom events for this purpose where appropriate (as pointed out by @dorilama)⌠so, as with so much in Bubble, there are various ways to achieve the same endâŚ
That the client-side Action plugin API doesnât support the creation of this sort of very simple (but very handy) action may be because that API is a bit naĂŻve, or it could be that returning values to the workflow in the client-side is actually quite difficult in that enforcing synchronous behavior in such a situation is difficult in the current Bubble architecture. (I suspect itâs a bit of both.)
And since this thread is turning into a very complete overview of different types of states and different approaches to âlocal variablesâ in Bubble, I will go on to mention that there are various element plugins that are like Custom States that can be used in certain situations. A couple of my own plugins (in addition to the aforementioned server-side action Flow State plugins) that offer custom-state-like functionality:
This topic was automatically closed after 70 days. New replies are no longer allowed.