CONTEXT("View") and web browsers

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 Solved
0 12 1,282
1 ACCEPTED 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.

View solution in original post

12 REPLIES 12

Steve
Platinum 4
Platinum 4

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?

2X_a_a698beb4b30e8cae153ed605d8ead8bcc061bd85.png

When viewing the app in a browser, ‘control’ is not part of the URL:

https://www.appsheet.com/start/e877112e-XXXX-4531-91a9-7c754cb811a6#_currentLat=XX.456066&_currentLn...

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.

@Steve

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"

Top Labels in this Space