Hi! I'm an Appsheet newbie.
I'm creating an app that have a table with 2 slices separated by a special flag which connected with 2 different views.
Now I want that from view A, when user click Add button, it will open Register screen that allow user register inputted data into DB with flag = 1 (that sorted in to slice of view A), and from view B, when user click Add button, it will open Register screen that allow user register inputted data into DB with flag = 2 (that sorted in to slice of view B).
Is there a way to do it?
As the data content is same, just using different flag, I really don't want to manage that data as a new table with the same content.
Furthermore, for the table, slices and views above, I want a special column with labelled as A at view A but then labelled as B in view B (column content is the same).
Please give me some advices. Thanks so much!
Solved! Go to Solution.
You can do this with your own "Add" action where it selects the Flag depending on the view name. It would be something like..
IF(CONTEXT("View")="ViewA",
LINKTOFORM("SliceA_Form","Flag","1"),
LINKTOFORM("SliceB_Form","Flag","2")
)
It should work , if the expression is coded correctly in all respects , view names etc. Hope you are trying it in the "display name" property of the column settings. Following is an example that changes the column display name based on view in my case.
Edit: I guess you are probably using display names of views also in the expression. If so, that is incorrect. In the expression, original names of the views need to be used.
So V1_Form to be used in the expression and not "Input X", V1_Detail and not "Confirm X" and so on.
App results below
Left -summary view, right" detail view
Form view
User | Count |
---|---|
17 | |
13 | |
8 | |
4 | |
2 |