Dear all,
I have a view with View formula as below :
ThisUser := @Name([CN]; @UserName);
NameList :=@Explode(AccessBy);
NmEle := @Elements(NameList);
@For(n := 1; n<= NmEle; n := n + 1; @If(NameList[n] = ThisUser; NmFound := NameList[n]; “”));
SELECT (Form = “$entry”) & (ThisUser = NmFound)
“AccessBy” is a multivalue field, so i tried to explode and assign it to a list variable, then using @For loop to do the comparison, to check whether current @username is in the list or not and show the documents which belongs to the user on the view.
The 1st column of the view is categorised with “AccessBy” value.
Based on the formula above, the view show nothing.
Please help. Thanks.
Subject: Problem with View Formula
You cannot use @username in a selection formula for shared views.Search the forum for username and view and you will find alternate solutions.
Subject: Problem with View Formula
Wow - this looks very strange!Even if this selection formula would running the performance would be very bad…
Option A) - Try this selection formula
@IsMember(@Name([CN]; @UserName);@Name([CN]; AccessBy)).
By the way: You should use the Canonical-name or Abbreviated-Name.
Option B)
Show all documents in the view. The First column shows the content of the Field AccessBy and use the Option “Show multiple values as separate entries”.
Then create a page, embedded this view and fill in the option “Show single category” (@Name([CN]; @UserName);
The advantage of Option B is that Notes doesn’t need to refresh the view-index every time the view is opened.
Good luck!