cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve a query value into a variable

Former Member
0 Kudos

Hi experts!

In the code below, I want to list in a browser, the Inbox names and the quantity of objects next to each.

While the function InfoObjectInbox.getTittle() gets me the name (SI_NAME) I do not find one that can get me the quantity (SI_CHILDREN), perhaps into the line: int aInt = ??????;

How can I achieve this?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can get the SI_CHILDREN value as below

String si_children=InfoObjectInbox.properties().getProperty("SI_CHILDREN").getValue().toString();

If you want to get the names as well, you would need to again query to infostore to get the names of the children in an inbox.

These are the steps to follow for that

1. Get the Inbox ID's as per your query

SELECT SI_ID,SI_NAME FROM CI_INFOOBJECTS WHERE SI_KIND= 'Inbox' AND SI_CHILDREN>0 ORDER BY SI_CHILDREN DESC

2. From the above query you would retrieve the SI_ID of the inbox's. Now this id becomes as a parent id to get the details of all the objects present in a inbox. Below is the query

SELECT SI_ID,SI_NAME,SI_KIND FROM CI_INFOOBJECTS WHERE SI_PARENTID=the si_id from above query.

Let me know if any issues in understanding the concept.

Thanks,

Prithvi

Message was edited by: Prithviraj Shekhawat

Former Member
0 Kudos

Hi Prithvi,

Thanks for your reply and your help.

I was able to get the results I wanted!

Thank you,

Enrique

Answers (0)