I have a simple two page app. On page 1, set a global variable to the id of a record in a table.
I then go to page 2. The global variable shows the correct value. This variable is the default key on a table - {{variable.value}} but the table will not select that row - even thought the result of {{variable.value}} is the right id.
If I manually refresh the value of the variable, either but a button running a script variable.setValue(id) or changing the Initial value of the variable to the id the table correctly sets the default key row.
So there seems to be an issue with the table recognising there is the variable.value in the default key ? some sort of update issue. Any thoughts appreciated. The goal is to click on a table row on Page 1 and then be on that selected row on Page 2.
I understand your problem , instead of the save id in global variable you can store that id into the local storage and use it where ever you want. For save the id in local storage use this
First page:
I think it's a question of the scope of the queries the tables are based on. If the queries are global (as the demo data in your example) or if I run the same global query for both pages, using a global variable or local storage both work and the row identified in the variable is correctly selected on Page 2.
However, in my case, the queries on each page are local to that page as they have filters - Page 1 has a text filter for name, Page 2 has a date filter. So those filters are locally scoped - I'm not sure how to make a filter global so they can be referenced in a global query - which could then be used on both pages and the variable passing between the pages could work.
Very interested for thoughts - can a date filter be made global - using additionalScope perhaps ?