CONTEXT("Host") always returns Server

CONTEXT(“Host”) is always evaluating to SERVER for my applications. Tested in:

  • Application editor
  • Chrome browser
  • Chrome browser device emulator
  • Samsung S10+ (Android)
  • iPad Pro (iOS)

Anyone else experiencing this?

Solved Solved
1 10 681
1 ACCEPTED SOLUTION

I’ve just tested this same thing in an action:

IF( CONTEXT("Host") = "Browser",
LINKTOVIEW("ALL TYPES") ,
LINKTOVIEW("parents")
)

All seems to be working correctly for me. I tested on a browser and my phone, and was sent to the appropriate view.

One thing you can do to test is instead of having the action navigate somewhere, just have it change the data of some real column to

CONTEXT(“Host”)

And see what gets output.

See more info here:
https://community.appsheet.com/t/bug-context-host-is-always-retuning-server-although-i-am-running-fr...

View solution in original post

10 REPLIES 10

Steve
Platinum 4
Platinum 4

Please provide a screenshot of an affected expression.

@Jonathon
CONTEXT(“Host”) always returns SERVER value when tested within the emulator inside the editor.

Not when I wrote the doc…

3X_f_8_f81eceaa98d3d2791cae2683f406a0fb8211dd0b.png

I believe CONTEXT(“Host”) always returns “Server” when used in a Virtual Column. This is because virtual columns are calculated upon every sync, and they are calculated by the server. Should probably wait for confirmation on that from @Steve and/or @LeventK though…

This hasn’t been my experience - I typically use conditional CONTEXT(“Host”) statements paired with LINKTOVIEW() actions to direct users to different views depending on device or browser. These arent working anymore .

Inside of an Action would be a different scenario than the virtual column that you posted above then. Can you provide more detail and screenshots of these actions?

IF(CONTEXT(“Host”)=“Browser”,
LINKTOVIEW(“view1_dashboard”),
LINKTOVIEW(“view1”)
)

I’ve just tested this same thing in an action:

IF( CONTEXT("Host") = "Browser",
LINKTOVIEW("ALL TYPES") ,
LINKTOVIEW("parents")
)

All seems to be working correctly for me. I tested on a browser and my phone, and was sent to the appropriate view.

One thing you can do to test is instead of having the action navigate somewhere, just have it change the data of some real column to

CONTEXT(“Host”)

And see what gets output.

See more info here:
https://community.appsheet.com/t/bug-context-host-is-always-retuning-server-although-i-am-running-fr...

Hi, I'm having the same issue. I'm using Context("Host") within a security filter and it is always returning Server. The reason that I'm doing this is because I'm running an Automation, and even though the Bypass Security Filters option is On, it is still applying the filter in the tasks ran by the bot. So I added the statement above to prevent that but now I'm realizing it is returning Server always. Any thoughts on this? Thanks!

Top Labels in this Space