Strange view 'caching' issue

Hi all

I’m having a very strange problem with views not dispalying documents correctly…it almost seems as though the view is ‘caching’ the previous user…

The aim is to display to the user only those documents where the user = the name in the field ‘EmpName’ or they are a member of a role…

I would expect this to either, fail and return everything, return nothing or return only docs where there username matches the EmpName field, however, it continually shows the ‘last person’ to access the view, not the one currently accessing it… I’ve put a msgbox on postopen to check the username being rtnd, and this is correct…am baffled…any ideas /suggestions…??

FIELD EmpName:=EmpName;

user:=@Name([CN];@UserName);

SELECT Form = “Employee Form” &

(

@Contains(EmpName;user) |

@IsMember(“[Personnel]”;@UserRoles) | @IsMember(“[Admin]”;@UserRoles) | @IsMember(“[Directors]”;@UserRoles)

)

TIA…!

Subject: strange view ‘caching’ issue

@Username should not be used in a public view because it causes unpredictable results. I think it is something to do with the view index but if you search the forum you will find a more in depth explanation.

To do this embed the view on to a form and restrict it to a single category.

Subject: RE: strange view ‘caching’ issue

hmm…thanks Matt! I’ll have more of a look around to see if I can find another option as embedding the view on a form is not suitable in this instance…

thanks for your post ;0)

Subject: strange view ‘caching’ issue

Another way to do it would be to use Readers fields and to put the contents of the field EmpName and the various roles into a multi-value Readers field. You would then remove the additional selections from the view and it should work OK.