BusinessObjects Board

Folder_ID of a folder in cms respository

Hi,

I need some help regarding folder located in CMS repository. As folder located in CMS respository has a parent_ID and all the reports can be open when this parent_id is found. What i wanted to know how to get parent_id or folder_id giving input as folder name by the user. Is there any queries to handle that? I think, CI_INFOOBJECTS table don’t have any information regarding folder name.

Appreciate ur help

Regards,
Nagendra


nagendra (BOB member since 2009-01-21)

You can use query builder to get the ID. Here is a sample query for a public folder named Test:
select SI_ID, SI_NAME
from ci_infoobjects
where si_name=‘Test’
and si_kind=‘Folder’

Rachid


rachidb :morocco: (BOB member since 2006-07-06)

Thanks Rachid for reply

select SI_ID, SI_NAME
from ci_infoobjects
where si_name=‘Test’
and si_kind=‘Folder’ .

I think SI_ID is parent_id of all the reports/folder inside ‘Test’ folder. Is there way that you can combine two queries in BO Query builder. I was getting error.

Sample example:

select SI_ID, SI_NAME from ci_infoobjects where si_parentid IN (select SI_ID
from ci_infoobjects
where si_name=‘Test’
and si_kind=‘Folder’)

is there any other way to get all the folders/reports inside a folder giving input as folder name?

Regards,
Nagendra


nagendra (BOB member since 2009-01-21)

Query Builder does not allow joins like that. You may need to use SDK to get the info you need.

Rachid


rachidb :morocco: (BOB member since 2006-07-06)

But when r u executing query it returns as IInfoObjects type. Then u have to get infoObject further u will get infoObject.getID() method to get the desired result for executing other query.

As
infoObjects = iStore.query("Select * From CI_INFOOBJECTS where SI_Name=‘Test’ ");

infoObject = (IInfoObject)infoObjects.get(0);
parent_id=infoObject.getID();

infoObjects = iStore.query(“Select * From CI_INFOOBJECTS where SI_parentid=parent_id”);

this whole process look too exhausting.

Is there any other way to combine the two queries?

Apprecaite ur help again.
Nagendra


nagendra (BOB member since 2009-01-21)

That how SDK was implemented by the vendor. If it makes you feel better you can combine all in one line using casts:
infoObjects = iStore.query(“Select * From CI_INFOOBJECTS where SI_parentid=”+((IInfoObject)(iStore.query("Select * From CI_INFOOBJECTS where SI_Name=‘Test’ ")).get(0)).getID());
One more thing, it is highly inefficient to use select *. Always select specific attributes you need like SI_ID, SI_NAME, etc.

Hope this helps.
Rachid


rachidb :morocco: (BOB member since 2006-07-06)

Thanks Rachid. It works fine :slight_smile: .

Thanks
-Nagendra


nagendra (BOB member since 2009-01-21)

Hello Rachid,

Can you please help me with the query that I need to fire inorder to get the total count of Publications or Scheduled jobs in one of server.

Using BO XI R2 version for my project.

Any help in this regard would be high value add to me…

Thanks
Raki


Raki123 (BOB member since 2007-05-15)