Hello. The context function (โViewโ) works correctly with the Form View but not with Detail or Table. I have a blank return.
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:
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โ
User | Count |
---|---|
41 | |
36 | |
28 | |
23 | |
16 |