-
try this.
DirectorySearcher search = new DirectorySearcher();
search.Filter = String.Format("(SAMAccountName={0})", userName);
search.PropertiesToLoad.Add("cn");
SearchResult result = search.FindOne();
-
I want to get a % total for a series of questions which i have used 3 radio buttons for each question, Yes, No and N/A. I need it to calculate the % on all questions minus the ones marked N/A.
-
what exactlyy do you want
-
Hi I have done this, its getting stuck on this line
searchresult result = searcher.findone();
the username is being passed ok e.g. an example username would be "tsy".
its says "the "tsy" search filter is invalid" I dont understand how this can be invalid, it is the correct active directory ...
-
Ok i have used the following expression but not liking it...
100 * count(q2.1 + q2.2 + q2.3 [Answer = "Yes"]) / (count(q2.1 + q2.2 + q2.3)) - (count(q2.1 + q2.2 + q2.3 [Answer = N/A]))
Where am I going wrong?
-
why dont you debug your code and see what is breaking
-
yes,
it is supported in office 2010, but still majority of people are using office 07 or lower versions.. and office 2010 is yet to be released to general massess. it is only released to volume licence partners, that is why our posts still refer to 2007 as the default version.
-
its a mistake, i have put this line in now:
string userName2 = userName.SelectSingleNode("/my:myFields/my:Authoriser", NamespaceManager).Value.ToString().Remove(0, 6);
however still the same problem, output to a message box and the variable is being pulled ok but going wrong after that.
Thinking about assigning ...
-
you can try
100 * (fiel1, fiel2, ....fieldn) / number of fields
eg: 100 * (field3 + field4 + field5) / 3
-
what is this statement supposed to do
userName2 = userName2(0, 6);
i think you should use
userName2 = userName2.Substring(0, 6);