Show / Hide Action
I have 2 Detail Views coming from the same table. I want Actions only to be shown in one of the Detail Views. I know I can o this by creating a slice. But can’t this be done also via the CONTEXT() expression? In the Action --> Behavior --> “Only if this condition is true” I tried the formula
CONTEXT(“View”) = “DetailView1” to only show the Action in the DetailView1. But it doesn’t show up. Has anyone a solution?
It should work if your view name is correct. Have you created your own action or are you using system generated Edit action?
@Aleksi_Alkio I want to do this with the system generated Edit action AND with my own created Actions. But I think I’ve sorted it out: It is working in a Detail view. But not in a Dashboard View. I have to use the view name from the Dashboard and not from the Detail View.
CONTEXT(“View”) = “MyDashboard” But that leads to the same problem again, because the 2 Detail views are part of the same Dashboard. So the Action shows up in both Detail views again.
I have the same problem… did you find a solution?
No I didn’t. This limitation is still there.
You can accomplish your goal with slices, right? You’re just looking for a simpler solution?
So, a general question, as I’m having related issues, is there any way to inspect a view to see what the context properties have been set to?
Yes. I’m able to do that with a Slice. In the Slice I can set the Action I want to show or not.
My goal is this:
When I use Context("View") <> "Dashboard"
- then in no Detail View will be any Action.
Context always gives the top-level view name, in this case the dashboard view.
When I use Context("View") <> "Detail View 1"
- then there will be no Action, because I’m in the Dashboard View. I would have to open the Detail View 1 to see the Actions.
So: It’s possible, but only with Slice, not with CONTEXT() Expression.
I think there are some issues with Dashboards used in CONTEXT().
My use case was to have Actions appear in a Dashboard version of a view and be removed in the standalone version of the view. No matter what combinations I used of “View” or “ViewType” for the Dashboard or the Dashboard View Name, “=” or “<>”, the Actions always showed in BOTH views.
User | Count |
---|---|
37 | |
30 | |
29 | |
20 | |
18 |