Hello !!
I have a shared view where a column has a formula…
@if(@IsMember(@Text(@Username);contactUserlist);“Active”;“Inactive”);
contactUserlist is a field where the usernames are stored.
This formula is not getting calculated for for each user when he logs into the application.
I have already indexed the database.
Situation:
A particular user changes the status of the doc to “Active” and closes the database. The another user logs into this database and access the view, the doc still shows “Active” as the status of the document, while the status should be “Inactive” for that user because his name is not in the “contactUserlist” field.
please let me know how to recalculate the formula every time the user access the view.
I had used notesuiworkspace.viewrebuild, it was working fine but the performance of the application drastically dropped and crashed for more than 5 users.
A liitle nudge towards the problem would be highly appreciated.
Thanks in Advance…
Sanhita Ray
Subject: @ismember not working in a shared view column
UsageWhen a formula runs on a server, the agent signer is considered the current user. Using @UserName on a local database or in a private view in a server-based database returns the user’s name. You should not use @UserName in a public view, doing so produces unpredictable results. Also, if the field that you are referencing changes, you will get unpredictable results because the index has to be rebuilt to accommodate the new information.
One use for @UserName is to display only those documents relevant to the current user. For example, your Service Request database could use @UserName in the private view named Assignments to display each technician’s assignments, weeding out everyone else’s:
SELECT @UserName=AssignedTo
However, the user can still design a different private view that retrieves all documents, so don’t depend on @UserName as a security mechanism.
For an alternative way to display only documents relevant to the current user, see “To show a single category in an embedded view.”
Subject: @ismember not working in a shared view column
Try this using the Embedded view as in below link and then have a computed text in the form which calculates the status based on user when the document is opened. Do not display the status in the view.
http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/22145bd3d00671478525745d0063d8ea?OpenDocument
Subject: Sanhita please meet Sampad
You both have identical questions.
Your issue is the use of @username in a view.
You will need to make the view private on first use to get the users name in @username.
The help database is great in situations like this.
Subject: RE: Sanhita please meet Sampad
“You both have identical questions.”
Curious isn’t it? Amazing how that happens. 