I store my backend online database in an app variable when my app opens on the global canvas, this is to avoid the app loading the entire database on every page in the app.
I have an item list page showing data from the app variable but I can send the id to the next page so it knows what item was picked. It works fine with “get record” from the database backend when using the data variable but I can’t get it to work when trying to fetch the data / get a single record from the app variable.
Hi Dan! If you have a page that takes the ID of a record as a parameter, you can get an individual record from your list type app variable with the formula FIND_BY_KEY(appVars.records, "id", params.id)
I have tried your suggestion and I do get a picture and text on the next page but it does not reflect the option you have chosen in the list item, it just gives me the same picture and text no matter what you pick.
Not sure if I am not sending the correct id or if it’s me not writing the formula correctly.
Hi, it’s likely because you are not taking the id from the parameter that you passed, but always from BrowseposterX[0]. So change that to params.id or whatever your page parameter is called
For example if I had a fruit listing and a fruit detail page that takes the name of the fruit as its parameter, this is how I would access the name of the chosen fruit:
Yep that was it, now both a single picture and text are tracking through just fine.
The only thing I struggle with now is I have a row of pictures repeated with
MAP, this is the formula I used to have:
MAP(data.BrowseposterX1.Scroll_Pictures,{id:item})
I thought it was working but now I stopped using any data from the online database the row of pictures has stopped working, so don’t think I have done it correctly.
I have now switched over and only getting information from the app variable. Before, the page got information from a data variable set from the online database and the clientside database app variable. Now I am only using the app variable.
I am only having a problem with the scroll pictures(row of pictures), repeated with MAP everything else works fine.
Hard to say what might be the problem here probably there is still some reference left to the data variable, or somehow the app variable is not populating correctly. If the row was working before, I don’t see why that would have been set up incorrectly.
My app variable schema looks exactly like the schema set by the data variable linked to my external database. Now the row of pictures are getting the data from an app variable and not a data variable.
I have the same set up another place in the app, but this time the row of pictures are set by a clientside data variable and it works fine. I think the problem is when I am trying to get multible pictures stored together in the app variable in a repeat. Sorry not explaining it very well.