I’m having trouble filtering a view in my app using a parameter passed via URL. I have two apps: App1 and App2. From App1, I generate a URL to open App2 with a specific parameter, like “https://www.appsheet.com/start/fd541e46-xxx-xxx-xxx?row=” & ENCODEURL([ID]) & "#view=TEST, where [ID] is a unique identifier (e.g., ‘d39b1b05’).
In App2, I want the ‘TEST’ view to show only the record where MYAPP1ID (column in my APP2 where i’ve saved ID App1) matches the row parameter from the URL. I’ve set up the ‘TEST’ slice with the filter [MYAPP1ID] = CONTEXT(‘Row’). The view ‘TEST’ is based on this slice.
However, when I open the URL (e.g., …?row=d39b1b05#view=TEST), the ‘TEST’ view shows all records instead of just the one with MYAPP1ID = ‘d39b1b05’. I’ve also tried using CONTEXT(‘QueryString’) with custom parsing and other approaches, but none have worked.
All users access the app with the same email, but I don’t think this should affect the URL parameter handling. Can you please help me figure out why CONTEXT(‘Row’) isn’t filtering the slice as expected, or if there’s a bug or misconfiguration in my setup?
Those are not valid properties, as far as I know, to use in the CONTEXT() function.
It seems you are trying to pass the Row ID between apps and use it to filter a Slice withe goal of presenting a view filtered to just that single row. There are no mechanisms to do that.
Instead you would either need to look up the App 2 Row ID in App 1 so you can set it on your URL when you create it. OR you could setup a small “variable” table used to store the value you wish to pass between the two apps. If you are able to have Quick Sync’s on, this should work fine. Otherwise, you will need to force a Sync in App 2 to ensure it has the updated “variable”.
I see. Since there could be multiple rows, the only option I know that will work is to use the “variable” table.
The idea is that you add the same “variable” table to both apps. Assign the desired Row ID to a row in App 1, read that value in App 2, use it to filter the Slice and then use that Slice in a view. NOTE: you may need to include a user identifier in your “variable” table if there is a possibility of multiple users performing this function at the same time.
If you are navigating from app to app, you can then actually use the LINKTOVIEW() function to specify your new view in App2. And now that I think about it, when to go from app to app, I think AppSheet automatically performs a Sync.
If you are sending the link to the view in an email, then you you just provide the URL for that new view, no Row ID would be needed but you would need to include the “force sync” property.
The cache (of my chrome browser / appsheet) “lock” the updated query.
If i delete manually the cache the query works, if i make a second query, even if in my variable table is saved the updated data i continue to see as result of my search my previous record searched …