On the Windows Access Control (WAC) Table I am trying to filter the Login ID with the USERID. The problem that I have is that I have tried the following : WAC.Setrange(“Login Id”,’*’+USERID); This fails, and I have been told that this is a conflict when a setfilter finds a special character. In this case it finds a ‘’ as this seperates the domain and the login id. i.e. USERID=deanaxon wac.“login id”=ad\deanaxon any suggestions on how I can do this without hardcoding the ‘ad’ ?? TIA Dean
Hm, I tried it and the ‘’ does not cause any problems. However, there are several topics mentioning unexpected behaviour when using ‘’ or ‘@’ in filter expressions. Try WAC.SETFILTER("Login Id", '%1%2', '*', USERID);
to prevent literal interpretation of the '’.
Heinz, the problem is not the ‘*’ but the ‘’ that it finds in the filter. Should that make a difference ?? Dean
I forgot to mention that the “ad” is the domain and the rest is the userid so I have been advised. [:I]
Hi Dean, I’m not sure if this is related to your actual problem but here goes. The Windows Access Control table stores the User SID from Windows. This data is not in the typical DOMAIN\UserName or UserName@Domain formats. The field “Login SID” stores this SID information and represent the relationship to the “Windows Login” table. The field “Login ID” tries to use use the “SID - Account ID” table to automatically translate/resolve the SID into DOMAIN\UserName format. If you want to, e.g., check if the current User is assigned a specific Role, I would suggest you to filter using the SID instead. Take a look at this thread, you will see how to obtain the SID for the current User: http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=9015&SearchTerms=windows,session,setrange,find From there you can use it to filter on the Windows Access Control. Hope it helps you
Dean, I now tested both cases. I put a ‘’ into a text field of a table and set a filter on this field. First without a ‘’ in the filter expression and then with a ‘’. No problem, both filters worked as expected. I would therefore suggest that the ‘’ is not the problem. Maybe you should follow Nelson’s advice and check the WAC table…