Hi,
I am trying to modify an expression that generates dynamic url (called UNIQUE_ID for this example) to generate same result based on a different view.
The below is the existing found in template url generator found in a bot tasked with generating emails to specific clients:
https://www.appsheet.com/start/<<CONTEXT("AppID")>>?platform=desktop #viewStack[0][identifier][Type]=Control &viewStack[0][identifier][Name]=Menu &viewStack[1][identifier][Type]=Control &viewStack[1][identifier][Name]=Dashboard &viewStack[1][mutableState][ControlName]=Dashboard &viewStack[1][mutableState][Root]=gallery &viewStack[2][identifier][Type]=Control &viewStack[2][identifier][Name]=CONTROL_NAME &viewStack[2][mutableState][ControlName]=CONTROL_NAME &viewStack[3][identifier][Type]=View &viewStack[3][identifier][Action]=detail &viewStack[3][identifier][TableName]=EXISTING_TABLE &viewStack[3][mutableState][TableName]=EXISTING_TABLE &viewStack[3][mutableState][RowKey]=<<UNIQUE_ID>> &viewStack[3][mutableState][SortBy][0][Column]=submitted_dt &viewStack[3][mutableState][SortBy][0][Order]=Descending &appName=<<CONTEXT("AppName")>>
I am not familiar with this expression, but I noticed that CONTROL_NAME refers to an existing item on the Menu page. EXISTING_TABLE refers to a table in a table in App and the result generated is around "UNIQUE_ID". My problem is, when I replace "EXISTING_TABLE" with "NEW_TABLE", the solution no longer works. Both Tables are slices of the same table. Is there something else I am meant to do to "NEW_TABLE" for this to work.
The easiest problem would be to modify EXISTING_TABLE to meet my use case, but the table is used for other purposes.
Ideas anyone? Even resource on how to use this would be great. Deeplink and link2row() would not work in my case.
Thanks
Solved! Go to Solution.
Thanks @Kirk_Masden for your effort. I however was able to find a workaround, and I'd like to share the details for anyone facing a similar challenge.
The biggest hurdle was getting the app to accurately identify a specific row. Fortunately, this formula does the job effectively.
First, it identifies the platform as platform=desktop, ensuring the link works correctly on desktop devices.
Next, the formula identifies the row (unique_id) within the view of your choice, which you can replace with your actual view name:
MID(LINKTOROW([unique_id],"Replace_with_your_TableName"), FIND("&row=", LINKTOROW([unique_id],"Replace_with_your_TableName")) + 5, 36)
This formula extracts the unique row identifier from the link, making it possible to pinpoint the exact row you need.
When you combine all the elements, you get a complete URL that directs to the specific row within your app:
https://www.appsheet.com/start/<<CONTEXT("AppID")>>?platform=desktop#row=<<MID(LINKTOROW([unique_id],"Replace_with_your_TableName"), FIND("&row=", LINKTOROW([unique_id],"Replace_with_your_TableName")) + 5, 36)>>&view=Replace_with_your_ViewName=<<CONTEXT("AppName")>>
This URL ensures that the app opens on the desktop platform and navigates directly to the specified row within the chosen view.
Thanks again and have a wonderful rest of the day.
I tried to look for official documentation regarding the use of &viewStack in AppSheet but couldn't find anything. Sorry 😞
Here's another unanswered question that seems related:
https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Desktop-Mode-refColumnName/m-p/723834
Thanks @Kirk_Masden for your effort. I however was able to find a workaround, and I'd like to share the details for anyone facing a similar challenge.
The biggest hurdle was getting the app to accurately identify a specific row. Fortunately, this formula does the job effectively.
First, it identifies the platform as platform=desktop, ensuring the link works correctly on desktop devices.
Next, the formula identifies the row (unique_id) within the view of your choice, which you can replace with your actual view name:
MID(LINKTOROW([unique_id],"Replace_with_your_TableName"), FIND("&row=", LINKTOROW([unique_id],"Replace_with_your_TableName")) + 5, 36)
This formula extracts the unique row identifier from the link, making it possible to pinpoint the exact row you need.
When you combine all the elements, you get a complete URL that directs to the specific row within your app:
https://www.appsheet.com/start/<<CONTEXT("AppID")>>?platform=desktop#row=<<MID(LINKTOROW([unique_id],"Replace_with_your_TableName"), FIND("&row=", LINKTOROW([unique_id],"Replace_with_your_TableName")) + 5, 36)>>&view=Replace_with_your_ViewName=<<CONTEXT("AppName")>>
This URL ensures that the app opens on the desktop platform and navigates directly to the specified row within the chosen view.
Thanks again and have a wonderful rest of the day.
User | Count |
---|---|
17 | |
14 | |
8 | |
7 | |
4 |