This is really strange
I have set the var user to the distinguished name :
var user:String = context.getUser().getDistinguishedName();
then make the query
tmpArray[cTerms++] = "(FIELD ACCurrentApprovers CONTAINS \"" + user + "\")";
and it fails to find any documents, however if I set the var user to the Common Name
var user:String = @Name("[CN]",context.getUser().getDistinguishedName());
it finds the correct users, which is OK until there are two people in the organization with the same common name but in different OU's
would the "/" in the distinguished name CN=Some Name/O=Some Org causing problems. Clearly ACCurrentApprovers is fully distinguished as is the getUser().getDistinguishedName()
I've got it working but not deliverable.