Passing data between forms/pages

So I’m working on my first betterforms project and am strugging to pass data from one page (form) to the next. On the first page I pull a list of data from my database. It displays a summary of each record’s data and the unique record id.

The user then clicks on a row for the record they want, which calls a utility hook to pass the selected id back to filemaker. I then pass that id to the global app model so it can persist across pages. In the action step after the utility hook I perform an action step to load another form designed to display all the record’s fields. The problem is what when I try to grab the id from the app model on the new page’s onFormRequest Filemaker script, so I can pass it to the $$BF_Model for the new page, it’s blank. I know the app model is be populated correctly because I can see it in the Dev Tools page on the second page. Is this how I should be passing data from page to page? Is there something I’m missing?

The $$BF_App does not get passed back to Filemaker, only the $$BF_Model does. You can set data in $$BF_App which will reflect on the front end’s app model, but not vice versa.

There’s a few ways to handle this workflow, but I would suggest using a query. You would attach the record id to the query of the path to the new page (i.e. somesite/#/detail?id=12345), and the onFormRequest can grab that id out of the $$BF_Query.

See the Example - Invoice List for an example of appending a query after clicking on a table row.

I was passing the data back to Filemaker via the $$BF_Model, then passing the data (via Filemaker) to $$App_Model on the first pages UtilityHook script. Then the second pages load script was trying to get the data back from $$App_Model, which is when it would appear blank. If this is not a viable strategy, I will look it passing at using a query.