Hey all. I would love to have the column name be different depending on whether itโs a table view or detail view.
Iโm using a dashboard for table view in an inventory app and Iโd like the column name to just be narrow, OH QTY (short for on hand quantity) but for a detail view it would be nice to have the full name since there is more room. ON HAND QUANTITY.
Can anyone help w the expression here? Would it be an IF expression and then use CONTEXT somehow?
Try this.
SWITCH(CONTEXT(โput here view nameโ),
โview1โ,โcol name 1โ,
โview2โ,โcol name 2โ,
โDefault col nameโ)
should instead be:
SWITCH(CONTEXT(โViewโ),
โview1โ,โcol name 1โ,
โview2โ,โcol name 2โ,
โDefault col nameโ)
The argument to CONTEXT() should be the raw text value, View
, not the name of the view.
See also:
Great I figured that out @Steve thank you!
What I noticed is the column names do not show as either of the two custom names in a dashboard view but rather just the default. Is this normal behavior?
I was hoping to have a list view with a short name and detail view with a longer name in a dashboard
Iโm not sure you can do thatโthough itโs not something Iโve (recently?) tried, so I canโt say for sure.
@Steve I just realized a pretty easy workaround is a virtual column displaying the value of the first column and using that on one view and the original on the other view.
Duh lol
User | Count |
---|---|
43 | |
28 | |
24 | |
24 | |
13 |