Multipage app the data inputs and results are not sharing from page 1 to page 2 with localstorage and URL method

Hey

I built a multipage app in Retool where the first page contains multiple user inputs and calculations based on those inputs. I've tried two methods to pass data to the second page:

  1. Using localStorage:
  • Issue: Cannot read the latest data
  • Issue: The data takes too long to load
  1. Using URL method:
  • Issue: Page 2 cannot find the saved data
  • Specifically: Shows 0 keys

Could you help identify what's wrong with these methods and suggest a solution?"



Does your use case require the { collection: } syntax?

This works for me with localstorage, for example, passing the value from page 1 to any other page:

1 Like

Hi @Freya both of these event handlers are working for me :thinking:

Are you triggering them at the same time? If so, there could be a race condition, and I would recommend triggering the localStorage one first before the go to page event.

Otherwise, could you share an app export for us to test with?

Hey,

With Page One Click Event used localstorage:
image


And I want to call this number in page two, the saving rate is used in a query and in that query is almost all localstorage data. The second one just number display from page one to page two. Those two values all states 0 and not being sucssfully called


image

I tried with url and localstorage method for this two click event, but they are not working.
Also do I need run localstorage.clear() each time to refresh the page's memory?

Thank you.
Happy Holiday!