Hi there,
I have a workflow set up which handles whether a user can access certain pages or not.
I want to use use the same workflow on multiple pages without creating the same workflow in every page. Is this possible?
Thank you
Hi there,
I have a workflow set up which handles whether a user can access certain pages or not.
I want to use use the same workflow on multiple pages without creating the same workflow in every page. Is this possible?
Thank you
You can with a reusable element.
It is a workflow saying if the contact is type A show the page and if the contact is Type B show another page.
This logic will be used for multiple pages.
You could also use a recurring event or backend workflow
Thank you. I think I came across backend workflows but couldnât figure it out couple of months ago. I should revisit then
What you do is use the page on which youâve built that feature as a template. When you create a new page, you use that template page as the page to clone from. Now your new page has those features.
(BTW, no previous reply is helpful.)
Thank you Keith.
But the pages were build already
And your suggestion is a good hack but not exactly what Iâm after for.
Basically I wonder if we can define a function (workflow) in 1 place and call the function from other places .(pageS)
No, you cannot.
The closest you can come to this is the âreusable elementâ concept, which is not what youâre looking for.
(The reason being is that Bubble builds web pages. Itâs not a framework like React is a framework. Anything you use in a page must exist in the page. Thereâs no âcallingâ things from another page. Nothing exists outside of the current page.)
This is easy. Create backend workflow to do what you want. Then on each page set a workflow event for on page load and trigger that backend workflow event. Easiest, and actually does work.
@keith, could he not use an RE solely with a custom event and then call the REâs custom event from whatever page he wants?
Yes, I also see no reason why the BEWF wouldnât work.
There is no reason it wouldnât work. Backend workflows are in my mind basically a reusable workflowâŚno need to create a reusable element just for a single workflow.
@SerPounce @boston85719 @keith Thank you all.
Time for me to work on
Yes, this is a backend workflow. Build a workflow in backend workflows and then in other places call it by doing a workflow event in another location to âtrigger a backend workflowâ
Well, no, itâs not what the OP is asking for. OP wants for there to be a context object that persists across pages. There is no such thing in Bubble. (Because the pages are âREALâ pages.)
The only thing youâll need to ensure is that the data a all good to go because there is no Visual Error handling.
Simple yet genius!