Hi,
I am building a web view with this view selection:
SELECT ((Form = “Documents”)) & (@Contains(Readers; @Name([CN];@UserName)))
but I can’t get it to work. Why?
Best regards
Torben Lange-Pedersen
Hi,
I am building a web view with this view selection:
SELECT ((Form = “Documents”)) & (@Contains(Readers; @Name([CN];@UserName)))
but I can’t get it to work. Why?
Best regards
Torben Lange-Pedersen
Subject: View Selection with @Contains virker ikke
You (almost) cannot base a view selection formula on @UserName. The view index is created and updated by the server and it is the same for all users. For whom should the collection of documents to be displayed be build?
My preferred approach is to use a single category view, (categorized by Readers, in this case) and provide @UserName as the single category value. Reader name fields should contain full hierarchical names, so just using the common name component is no good idea.
Subject: RE: View Selection with @Contains doesn’t work
Harkpabst is right, but I would add two things:
@Contains isn’t the most efficient way to test whether a list contains a value. Use =
If Readers is a reader names field, there’s no need to do anything special to check whether the user has access to the document. The server already won’t show any documents to which the current user has no access.