Need Help transferring values to local storage

I am familiar with saving Tables to Retool then taking values from the Table and putting them in localStorage.

But I need to find a way of transferring values to localStorage without restoring a data file to a Retool Table.

I am trying to use the Success Handler "Set Local Storage" as per the screens below:

This screen shows where I derive the value @GrTotal. It recognizes the value as 5374.52


The Value is 5374.52

This screen shows the syntax I am using for the Success Form Set Local Storage
PrScreen02

This shows the properties of SaveTaxes01.


It is registering the value @GrTotal of 5374.52

Yet nothing is transferring to Local Storage. I suspect that I have a syntax problem in the Success Form.

If anyone has suggestions, I would be pleased to hear from you.

Mike

local storage is key/value paired, it looks like you're missing the key part
image

Bob:

What goes into the "Key" field?

Mike

whatever you want to name that value. its the same as a variable name

Scott:

I don't think the variable is transferring to the Local Storage form.

See below:

Here is where the variable @GRTOTAL is generated. It has a value of 1761.7

Here is the reference in the Success Handler to the local storage form.

If I click on the calculating field, it says "undefined"

If I check the local storage, again it says "Undefined".
PrScreen04

I don't think the value is transferring from the initial screen to the Success Form.

Any thoughts?

Mike

We have to do something similar to what we did here:

They key in SaveTaxes01.data is not ["@GRTOTAL"] but ["@GRTOTAL :=NEXTRA1"]. The space character can be an issue. I would remove the space in the SQL query, setting the variable to @GRTOTAL:=NEXTRA1 (instead of @GRTOTAL :=NEXTRA1).

After that update, set the "Value" of the Success event handler to:
{{SaveTaxes01.data["@GRTOTAL:=NEXTRA1"]}}

1 Like

Paulo:

It worked!

I think I have enough samples now that I can get this to work in the real world.

I will mark it as a solution.

Thank you so much.

Mike

1 Like