Understanding the correct way to manage shared state and trigger Global resource queries in a multi-page Retool app when a dropdown selection should drive all data

help in multipage app - global code config

  1. My goal: To select a company once and have that selection consistently drive Global DynamoDB queries and derived JS queries across multiple pages in a Retool app.
  2. Issue: After moving resource queries to Global, it’s unclear how they should react to shared state since they don’t expose “Inputs” like JS queries, leading to queries not running or returning empty data unless manually triggered.

Hello @Amritya_Singh! Welcome to the community, and apologies for not seeing this post for a few days until it was bumped.

It sounds like there are a couple of ways that you could manage a global state with your stated goal. The first would be to add a global sidebar/header to the multipage app, which will persist across all pages and be able to drive both global and sub-page queries if necessary:

Another way to manage multi-page states for global queries is to create a global variable and then set its value using an On Change event handler in your component. In your case, the Company select component would set the value of this global variable when its value changes. Other pages would then call upon the current value of the variable to make other queries. The global queries would also be able to use this value.