New plugin - Global Variables

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.


Keep on bubbling !

12 Likes

Here you can do a simple test of the plugin.

Go to https://jpdom.bubbleapps.io/ and ask for a free trial in the “Contact” section :slight_smile:

1 Like

You offering freebies ;)?

1 Like

You can try it to see if it works for 2 days, then you’ll have to buy me a beer :grin:
Just ask for it in the link I provided, include your app name please.

Just a simple explanation:

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”:

image.png

To access the value you just reference the element’s value:

image.png

For more questions, feel free to contact me through the website https://jpdom.bubbleapps.io/

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.

Happy bubbling !! :upside_down_face:

Please help. I found Set Global Variable action, but I can’t find Global Variable action to read a variable.

2020-12-29_19-15-12

2 Likes

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 ).

Please tell me if you need further help !

1 Like

HI,

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.

Thanks,
Rob

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.

Kind regards,

João Domingues

This issue is fixed, you no longer need to refresh the page to get the updated values, this is done dynamically.

Hi… Can we store list using this plugin? I mean key value pairs. or values with specific id’s.

Hi @pratimadudhewarpune !
This plugin allows you to store text only.

I’m sorry if it doesn’t meet your needs, I’ll add this to the plugin future features list.

Happy Bubbling!

Do you need any other plugin to achieve the same? Want to store API result data

Hello Joao,

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?

Hi @tomerlan5 and @exception-rambler ,

@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 :sob:… it’s just an unreliable architecture

1 Like