Show / Hide Action I have 2 Detail Views com...

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?

1 8 1,644
8 REPLIES 8

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?

@Fabian @jimdumont

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:


Detail View 1 and Detail View 2 are based on the same Table.
I want the Actions be shown in the Detail View 1 but not in the Detail View 2.
Right now I have Detail View 2 based on a Slice. Because in Slice I can disable Actions.

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.

Top Labels in this Space