We have a view that is created using the following concept:
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
Now, I know the cleaner way to do this would be to embed a view sorted and categorized by the field and then selecting a single category to display using the username… BUT… I want the view to be in the CALENDAR format which can’t have categories.
Anyway, the whole thing works fine until two users hit the view at the same minute and almost the same second. Then sometimes a user sees someone elses results which isn’t good. Is there a cache setting on the server or something that would cause this problem to occur only when two users are hitting at the same time?
By the way… all our users are accessing this view through a web browser.
I guess what I don’t understand is why the view works almost 99% of the time when my users access it from the web. It is being used all the time and it shows people only their documents unless two people hit at the same second. That is when the problem occurs. Is there any way to force the view to always index? I can’t do the embeded thing because I want to keep it in calendar format.
You can use a “Shared, private on first use” view. Here you are something from Designer help:
"A “Shared, private-on-first-use” view begins as a shared view and becomes a private view as soon as a user accesses and saves the view. These views give you a convenient way to distribute personal views to multiple users. You usually create this type of view by using @UserName to customize the display for each user.
Note that this is the only way to make a view work with @username, because the view selection is only parsed when the view is generated. Thus, if Tom opened a shared view that keyed to @username, all of Tom’s documents would display. But, if the view is still open when Jay accesses it, Jay sees all of Tom’s documents, and does not see his own. So, to avoid this conflict, designate the view as “Shared, private on first use” when using @username in the selection formula.
After a user saves a shared-to-private view, the user’s copy of the view no longer inherits design changes. For example, if you add a column to the view, anyone using a private version of the view won’t see the new column. To obtain design changes, users must delete their private versions of the view and open the shared-to-private view again.
Shared-to-private views are not a security measure, as they do not protect data. If you create a shared-to-private view that omits certain documents, a user can still create a private view that includes them."