COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => SDK => Topic started by: H_W_Lewis on 18 Dec 2017 08:08:37 AM

Title: Get Location of an Object (path of directory)
Post by: H_W_Lewis on 18 Dec 2017 08:08:37 AM
Hi,
I am searching for a fast method to get the location of any arbitrary object / entry in the content store.

Background:
Our LDAP Namespace is encrypted, i.e. the CAMID within Cognos looks something like:
"CAMID("prod01.myserver.de:u:966a678f2dc1954da95f6ce04c230799")"
The actual location of the user account that I want to extract could be, for example:
Directory > LDAP > People > Employees > Region A > Department C >

So it is impossible to reconstruct the location path from the CAMID / searchPath.

I was succesful with using the  .getParent() method recursively, but this is not very effective. The method needs to be called many times, since it only returns the direct parent.

In Cognos Connection, when you click on "Set Properties -> General" you can see the location path as well for any object. I'd like to know how to best extract that little bit of information.

Any help is appreciated. Thanks
Title: Re: Get Location of an Object (path of directory)
Post by: aussieadam on 05 Feb 2018 12:23:07 PM
If i'm understanding this correctly you just want a searchpath of an object? can't you just call the .getSearchPath() method within the sdk instead of doing getParent() over and over again?