Web view does not update @user

GreetingsI have a problem with views accessed trough the web in Domino. I currently use Domino 6.5.1.

When i try to create a view that only displays the documents created by the current user (based on login-information) the view does not update the information.

I try to confirm the information by adding a column with the formula:

@Name([CN];@UserName)

This shows that the view diplays old information and not the accutal current username. This problem does not occur when i use the formula in a form or on a page. Only in a view accessed on a browser.

I have tried to add diffrent styles of cache-clearing and also clear the browser every time i log in to the database. The view does however still display the old information. This is even the case when i use it as an embedded view on a page. (the page does show the correct username though)

Can someone give me a clue to why Domino is havning this behavior?

TIA

Subject: Web view does not update @user

It’s clearly documented that you cannot use @UserName in view selection or column formulas in shared views. Views are not real-time queries, they are stored indexes.

Subject: RE: Web view does not update @user

I’ve noticed that reading documentation is not a strong point of many users of this forum. One person even asked what to do, even though the error message explicitly stated what to do to fix the problem!

Subject: Web view does not update @user

You can’t use @username in a view. I don’t even think it works in the Notes Client. I inherited an app once where the previous developers used @username. The only way they could get it to work was to use @now in the selection criteria as well. By having @now in the selection criteria, you were telling the server to rebuild the view index for each access of the view. THEN @username worked. HOWEVER, (there’s always a however, right?), under heavy load this does not work because if more than one person tries to access a view while the server is rebuilding the index for the first request, the server sends the results for the 1st user to all users who requested the view. The only way a user would really see just his data was to request the view when no one else had requested it, and then the server would rebuild the index for that user.

Whew!!! Basically, you want to use a “single category view”. Categorized the view by the stored username on the doc. Then, from a URL you can access just the user’s docs with this url:

http://yourserver/db/view?OpenView&RestrictToCategory=Username

Subject: RE: Web view does not update @user

Dear Jack, thanks a lot for your input! It was a great deal of help… The @now can also be used in a column and hidden it works perfectly fine. :slight_smile: Possible alternate solution to issue while using @username in web resolved !

Subject: RE: Web view does not update @user

Thnx for input! I will try this workaround instead.