What is the fixed behavior of appsheet in terms of Context("ViewType) ?
For instance, I have a table view. Then place it to Dashboard.
For showif, editif or any other place where we place Context("ViewType) expression, how it should work?
For now, it appears to me Appsheet is just take into account Context("ViewType)=โDashboardโ even it is actually โTableโ or any other view tyep, once we place view to Dashboard.
I actually have field which I want to display only on Table view. I also have detail view made out of same table, which is also placed to the same table.
To show this field, I apply Context("ViewType)=โdashboardโ, but I m unable to โhideโ from detail view on the dashboardโฆ
Hi @tsuji_koichi,
I think all views within the dashboard are treated as โDashboardโ for CONTEXT() purpose.
Workaround could be to omit the column in the corresponding detail view in Detail View --> Column Order options or may be to create a slice only for that detail view without the said column.
Generally Iโve found that context(โVewTypeโ) returns the โtopโ level of things.
So if, to use your example, youโve got a dashboard with two tables in itโฆ context(โVewTypeโ) would return โDashboardโ
Iโve run into issues where Iโll try and get clever with context() and only show something sometimes, trying to base that off a view TYPE - only to find that it wonโt be showing because the context being returned by the system isnโt what I was expecting all the time.
Iโve found that sometimes itโs better to use:
in(context(โViewโ), list(
โView 1โ,
โView 2โ,
etc.
))
and just list all the views you want the specific thing to be shown in - instead of trying to base things off view types. But that only works if you have a few instances where you want something to be seen; if you have a huge list, or want it to be able to change, youโll have to figure out the context you need.
have you tried:
and(
context("ViewType") = "Dashboard",
context("ViewType") <> "Detail"
)
Perhaps that would sort of โbrute forceโ things to work?
In the same situation as @tsuji_koichi have a column I want in a table of my dashboard but donโt always want in the detail view. Do I have to make a virtual copy for the detail that hides on command? or is there a single column solution for this problem?
Slice
I need to change if they show or dont show though?
I guess I donโt fully understand. You have a table or slice that you want to display in a table view in a dashboard, but you want the table view to omit a particular column. You want the detail view for the same data set to conditionally show or hide that same column. Yes?
I didnโt read through the old thread.
Ya so the table view needs to always show a column and the detail views needs to show column A,B or C depending on another parameter
Is the detail view also displayed in the dashboard?
yes
So paperwork-register is OS, they click the OS type in the table and it shows the other component parts and the OS in the right, all on 1 data source. So I only want the OS that they clicked to show but it has to always show in the table.
As I skim the thread, the gist appears to that yeah, youโll need a separate column because CONTEXT() isnโt going to give you what you need.
did you solve this problem in some way?
User | Count |
---|---|
39 | |
28 | |
24 | |
24 | |
13 |