Select using Context("Table), Context("View") not working

Hi all,

I have a problem with the following select statement which always give me an result of null = not found:

ANY(SELECT(Listen[Hilfe Preview Link]; [Hilfe Typ]=CONTEXT("Table")&CONTEXT("View")))

It always returns null = not found although the value of CONTEXT("Table")&CONTEXT("View") exists in the column [Hilfe Typ] of table "Listen".

If I replace CONTEXT("Table")&CONTEXT("View") with the text itself it works.

It seems to be that CONTEXT() is not working in the SELECT statement as expected.

Does anybody has an idea how to solve this? This would be great!

Thanks, Joachim

0 8 218
8 REPLIES 8

HBT
Silver 4
Silver 4
  • I tested your statement. When you combine Table and View name, View name is blank, so your selected value is Null.
  • View - Name of the view currently displayed to the user or blank if no view is currently displayed (for example, in an automation workflow).  https://help.appsheet.com/en/articles/2347640-context

  • xpng.png

     

HBT
Silver 4
Silver 4
  • The above case applies to Virtual Column, but your expression works if you use it in an action.xpng.png

Thank you @HBT 

I am sure, that CONTEXT("View") returns the expected value.

I use the above SELECT statement in an action (behavior) with "External: go to a website".

To debug the result of the CONTEXT() function, I modified the actions behavior and added a confirmation message:

">>"&CONTEXT("Table")&"<<>>"&CONTEXT("View")&"<<>>"&ANY(SELECT(Listen[Hilfe Preview Link];[Hilfe Typ]=CONTEXT("Table")&CONTEXT("View")))&"<<"

This shows after clicking the action (Display overlay):

Joachim_Mund_0-1643554079855.png

which means:

CONTEXT("Table") returns "Texte"

CONTEXT("View") returns "Texte Anzeige  Bearbeitung_Detail"

but the SELECT statement returns null, although the exact values concatenated are in Listen[Hilfe Typ]

 

ifadeniz resimde gรถrรผndรผฤŸรผ gibi burada รงalฤฑลŸฤฑyor.xpng.png

xpng.png

thank you @HBT , the difference to your example is, that I call the action from another table="Texte" and view "Texte Anzeige Bearbeitung_Detail" not from table "Listen".

Thanks to your test case, my problem seems to be, that if the CONTEXT() function is used within the SELECT() statement, it has another context and not the context of the table/view from which the action is triggered. If I use the CONTEXT() function without the SELECT() statement it works correctly.

The use case is, to give the user a context sensitive help in table / views where the link to the help documentation url is in the table "Listen".

Thanks for the explanation, I tested the expression from another table as you said. If the table name in the select statement is the table where the view is located, the statement works.

But it doesn't work if you are querying a different table in a Select statement from a view. This is definitely a bug. @Steve 

@HBT Thank you for your help, your time and conclusion.
I spent hours solving the problem or looking for another solution.

I have found out, that CONTEXT("View") has the expected content, but CONTEXT("Table") will return the different table and not the table of the view.

Top Labels in this Space