I have two actions. I would like to limit their display depending on the view. I have set the condition CONTEXT(โViewโ)=โThis Viewโ.
This seems to be working perfectly when using the mobile app but does not when using the app in a web browser.
Is this a known limitation or am I doing something wrong?..
@Aleksi, @praveen, @Steve, @Leventk
Solved! Go to Solution.
No @Fabian, it wasnโt a dashboard view either. Just a standard map view with location points. When viewing a map in the mobile app or in the emulator, if you click on a point you are shown a deck view. Clicking this deck view then takes you to a detail view. Itโs here on this detail view that I used the CONTEXT(โViewโ)=โMy Detail Viewโ expression. The problem seemed to be, when viewing the map in a browser and clicking a point, the detail view is shown on the left, the user is not taken to a new detail view. I believe because of this, the CONTEXT expression when evaluated with result in false as the view would return as โMy Map Viewโ. In any event, I think I may have fixed it by using an OR expression:
OR(CONTEXT(โViewโ)=โMy Detail Viewโ, CONTEXT(โViewโ)=โMy Map Viewโ)
This expression accounts for the display being shown either in a mobile or web browser.
I would not expect different behavior between app and browser.
Is that the exact expression?
Where are you using the expression, specifically?
Hi Steve, thank you for taking the timeโฆ
That is essentially the expression, CONTEXT(โViewโ)=โThis Viewโ (I have triple checked the view name)
Since this works in the emulator and the mobile app, Iโm certain this is correct.
The expression to determine whether to display the action is set within the actionโs โOnly if this condition is trueโ field.
The action should be displayed in a Detail view.
What prominence? Overlay? Prominently? Inline?
Prominently
In the browser location bar, see if you can find the part of the location that begins control=
. There should be some text between it and a following ampersand (&). What is that text?
When viewing the app in a browser, โcontrolโ is not part of the URL:
I think youโve narrowed it down: Because this view is in fact a Map view and although I have clicked on an item displayed on the map which in turn displays a Detail_view to the left of the map, the CONTEXT is not picking up on the detail_view. I have tried changing the CONTEXT("view)=โMap viewโ to no avail.
I cannot explain it but, all seems well now.
Hi @Michael You may have just needed to refresh your browser??
Hi Lynn. Thanks for asking.
It definitely wasnโt that. I tried 3 different browsers and two different computers.
@Michael Are you using a Dashboard View?
No @Fabian, it wasnโt a dashboard view either. Just a standard map view with location points. When viewing a map in the mobile app or in the emulator, if you click on a point you are shown a deck view. Clicking this deck view then takes you to a detail view. Itโs here on this detail view that I used the CONTEXT(โViewโ)=โMy Detail Viewโ expression. The problem seemed to be, when viewing the map in a browser and clicking a point, the detail view is shown on the left, the user is not taken to a new detail view. I believe because of this, the CONTEXT expression when evaluated with result in false as the view would return as โMy Map Viewโ. In any event, I think I may have fixed it by using an OR expression:
OR(CONTEXT(โViewโ)=โMy Detail Viewโ, CONTEXT(โViewโ)=โMy Map Viewโ)
This expression accounts for the display being shown either in a mobile or web browser.
@Michael perfect solution!
I had the same issue in a dashboard view. When you want to hide Actions in a Detail view thatโs part of the dashboard view, you have to say:
CONTEXT("ViewType") <> "Dashboard"
instead of
CONTEXT("ViewType") <> "Detail"
User | Count |
---|---|
18 | |
10 | |
8 | |
6 | |
5 |