Hi !
I’ve built this simple plugin where you can set Global Variables on the user’s browser so you can access them without making a (slow) request to the database.
It uses the cookies to store those values, each time the user’s browser is closed they will be erased so don’t forget to add some logic to check if the Variable is there.
For now you can only store text values but tell me if that’s a problem, I’ll add other options.
The plugin is similar to another one but with a more reasonable price point.
If you set the variable in one page with the name (for example) “TEST”, when you want to access it on another page you place a “Global Variable” element and in the property named “Variable Name” you write “TEST”:
To access the value you just reference the element’s value:
UPDATE - I’ve changed the price in order to let you pay monthly for a lower price.
If you want a trial period I’m still offering that, just use the contact form in jpdom.bubbleapps.io and send me a request with your appID.
HI @kovtun!
Thanks for your purchase !
You set the variable using a workflow action, to read the value you have to place the “Global Variable” element on your page and set it’s property "Variable name " to the same name you used to set the variable . Then, you can read the value of the variable using “Global Variable A.value” (reading the element’s value ).
I’ve installed this plugin but I’m not getting the results I expect. On first use, I got the expected result, but I can’t seem to be able to ‘clear’ the variable or update it. Am I missing something very obvious here…?
Use Case: I’m using an API to get artist data from Spotify which I display in a RG. I have an icon in the cell so that the user can ‘select’ one row from the RG - at which point I want to update the variable as I may (or may not) do something with that value. When the user interacts with that list again (i.e. selects another RG item), the variable should be updated. So I expected this to be pretty simple to put in place, but for some reason the variable isn’t updating and I just keep seeing the 1st selected value.
Any thoughts?
UPDATE: It appears to want a page refresh until you can get the most recent value, however even that is giving very inconstant results.
Hi @rob.monkman!
Because of the way bubble treats the plugin you have to update the page in order to get the most updated result yes , this should work everytime . Please keep in mind that the results from an API request are also cached by bubble from what I understand ( requiring a page refresh).
If you need further help please contact me on private message.
I am using your plugin - Global Variables, and it worked great up to right now.
Suddenly it stopped updating the global variable I had in the background with nothing majorly changed. I have counted on your plugin a lot in the current app I am building and it is crucial I solve this problem fast for my superiors, please contact me as soon as possible and I can also help debug it if needed.
I don’t use this plugin but am seeing a behaviour on my own plugins that might have the same root as this.
To check, are you publishing a value through this plugin through one step in a workflow, and then referencing that published value / global variable in another subsequent step?
@tomerlan5 Sorry to hear that!
Are you using the latest version of the plugin? When did this problem start?
No change has been made recently to the plugin and it still works on my side so probably @exception-rambler is right and it might be something on Bubble’s side, if that’s the case I would ask you to report this behavior to Bubble.
@exception-rambler Thank you for sharing your experience and helping figure this out!
P.S. - If needed we can schedule a quick meeting so I can have a look at your issue but first please reply to my questions so I can narrow the problem and guide you.
@joao1997domingues - what I’m seeing this side is that publishState() is surfacing results too late for actions within the same workflow to make use of them.
Without true return values from client-side plugins it’s always left to chance as to whether the value appears before it is needed - this has normally worked out fine but right now dependencies seem to arriving first. The thing is, it’s not really a bug … it’s just an unreliable architecture