COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => SDK => Topic started by: jackmaster on 24 May 2012 10:38:40 AM

Title: Searchpath for query all account in Cognos
Post by: jackmaster on 24 May 2012 10:38:40 AM
Hello,

   In Cognos SDK, can anyone tell me the difference between 2 searhpath here, for example:

   String ns = "****";
   String searchPath1 = "CAMID(\"" + ns + "\")//account";
   String searchPath2 = "//namespace[@id=\"" + ns + "\"]//account";

   "ns" here is the namespace i want to query all its accounts, but the results return from sdk are not the same. I was confused, can anyone help me?
 
  Thanks!
   
Title: Re: Searchpath for query all account in Cognos
Post by: sir_jeroen on 24 May 2012 05:20:18 PM
What kind of differences do you find?
Title: Re: Searchpath for query all account in Cognos
Post by: jackmaster on 25 May 2012 02:28:05 AM
 When i query from my cognos server, the 2 searchpath return different results. For ex, when I log on to Cognos Portal with admin account, then go to Administrator -> Security -> Users,Groups and Roles, then I go to my namespace folder (for ex: LDAP), my list users there: user001, user002, user003.
When I do a query with:  String searchPath1 = "CAMID(\"LDAP\")//account"; it returns exactly user001, user002, user003.
But when I do a query with: String searchPath2 = "//namespace[@id=\"LDAP\"]//account"; its returns more than that: user001, user002, user003, user004, user005.
Note that I can login with user004 and user005 so these users do exist but I can't figure out that how they don't appear under my namespace folder and why these 2 searchpath return different results.
Title: Re: Searchpath for query all account in Cognos
Post by: sir_jeroen on 03 Jun 2012 04:04:42 PM
that's strange... What is return as searchpath for user004 & 005? What propenum array do you pass?
Perhaps they aren't correctly configured (e.g. no value set for displayName in LDAP)