Context("View")

Hello. The context function (“View”) works correctly with the Form View but not with Detail or Table. I have a blank return.

0 6 5,253
6 REPLIES 6

Reza2
New Member

Can you explain more details and steps you took to see the unexpected result?

Yes of course. I would like my Detail page titles to be shown only if there are one or more records = “Non conform” but they all remain visible in the forms of course. it did not work. To find out where the problem comes from I created a virtual column CONTEXT (“View”). I posted it in each view. Only the Form view returns the correct answer. In the Details and Table views, the chaps remains empty. I understand better why my display condition does not work but it does not explain to me why some results of Context () return from the void.

I believe using CONTEXT(“View”) in a Virtual Column may not be the best idea, as Virtual Columns are recalculated when there is change in data or you sync your app, whereas the current view could be changed as user navigates to different views; I also found this line in support document that could explain why you did not get results in some cases:
CONTEXT(“View”) returns the name of the current view or null if the expression is not run in the context of a view.
From this article:

Reza2
New Member

You could enter an expression like this in the Display name property of your Detail view:

=IF(IN(“Non conform”,Table[ConformColumn]),“Non Conform Title”,“Default Title”)

If you are wanting to check the view type (Detail, Inline, Form), you should be using CONTEXT(“ViewType”).

Thank you for your answers that will help me to research. To be more precise, these are the “header page” of my Detail view that I want to display or not depending on whether there is at least one record “Not compliant”

Top Labels in this Space