Retrive child objects using sdk in sap bo? - business-intelligence

I am trying to write a code to change report ownership. I need to retrieve all the child objects of a parent object. How to do it using the java sdk or query?

If you have the infoobject ID of the folder, it's easy:
select * from ci_infoobjects where si_parentid = x
x being the ID of the folder

Related

Maximo: How to enable search in list tab in application where main object is view

Suggestions are appreciated.
I created DB view ABC_VW in maximo database.
Created object with name ABC_VW in maximo.
Created power application with name ABC with main object ABC_VW in maximo.
On list tab the search is disabled.
How can I enable the search?
Note: I tried updating search type to WILDCARD from backend in both tables MAXATTRIBUTE and MAXATTRIBUTECFG but no luck.
Please suggest.
Whenever a view is created in DB and object is created on the view, a primary column has to be updated in MAXATTRIBUTECFG table as
update maxattributecfg set changed='Y', searchtype='WILDCARD', primarykeycolseq='1', defaultvalue=null, maxtype='ALN', length=22 where objectname='ABC_VW' and attributename='XXXXXX';
update maxobjectcfg set CHANGED='A' where objectname in ('ABC_VW');
Then apply configuration changes from the Database Configuration.
This is how the field from view can made searchable.

Is there any out of box SNOW(Service Now) api to create catalog item and its variables?

For e.g. , I want to create a catalog items under a category named "Backpack".Let's say I want to create a "Catalog Item" named "American Tourister" under the "Category" named "Backpack".I want to add the attributes like "colour","type" of these catalog items in the form of "Variables".
I have these values stored in my database.And data gets add up in the incremental form in database.
Is there any "Out of the Box API" in ServiceNow to create "Catalog Item" and its "Variables" using that out of box api,so that I can create catalog item and variables using data in my database.
For the latest 2 version (Jakarta and Istanbul) yes there is a set of classes for creating and manipulating catalog items, catalog categories, variable sets and variables, (CatItem, CatCategory, CatalogItemVariable, CatalogItemVariableSet, CatalogItemVariableSetM2M) please visit the official documentation for the server side APIs
I don't know about the other version but in case they are not there you can still make use of the GlideRecord API to manually do all this stuff, for example:
var catItemGr = new GlideRecord('sc_cat_item');
catItemGr.initialize();
catItemGr.setValue('name', 'American Tourister');
catItemGr.setValue('short_description', 'American Tourister Stuff');
catItemGr.setValue('category', 'sys_id for the category Backpack');
catItemGr.insert();
The above snippet can be used to create a new catalog item programmatically, you can set up the variables, variable sets and the relations using the same way
Via the REST API Explorer you can use the Namespace sn_sc to access the Service Catalog API.
Use this path to get to it:
https://.service-now.com/$restapi.do?ns=sn_sc&service=Service Catalog API&version=v1
You'll find the available operations on this page.

Setting an ID type property value from workflow in FileNet

Is it possible to set value for an ID type property from a workflow?
We have a workflow to create a date wise record folder everyday when first mail for that day is ingested in the system (IBM IER). For this we are using createRMFolder method from RM_Operations component which is OOTB component for IER.
We can set the properties for the new folder by passing them as a string array to the operation. But the issue is we need to set value for an ID type property for the newly created record date folder.
Please suggest if there is way of achieving this.
You can use the bundled CE_Operations component. Specifically, you need to use the setObjectProperty method passing it the Id object.

Disk space consumption for document class

I have FileNet Image Services, version 4.0.40 (not 100% sure). No access to the administrative interface, only Unix console, and database (Oracle). I need to get total document size, and also size of specific document class on disk. How do I do that?
Normally you would use the API with the call get_ContentSize(). If you can access the database, look for the docversion table in the object store db, I think you can also get the property directly from the DB there, If you then join the table with the classdefinition table you can look.
Here is an example of the query
select dv.object_id, vd.content_size from objectstore.docversion dv
inner join objectstore.classdefinition cl on dv.object_class_id = cl.object_id
where cl.symbolic_name = 'yourclassname'

Cross Database Join with Linq - Updating T4 template to support DB name?

I'm currently running in a multi-DB SQL Server environment and using linq to sql to perform queries.
I'm using the approach documented here to achieve cross DB joins:
http://www.enderminh.com/blog/archive/2009/04/25/2654.aspx
so basically:
2 data contexts - Users and Payments
Users.dbo.UserDetails {PK: UserId }
Payments.dbo.CurrentPaymentMethod { PK: UserId }
I drag the tables onto the DBML, and in the properties window, change the Source from dbo.UserDetails to Users.dbo.UserDetails to fully qualify the DB name.
I can then issue a single data context cross DB join by doing something like:
var results = (from user in datacontext.Table<UserDetail>()
join paymentmethod in dataContext.Table<CurrentPaymentMethod>() on user.UserId equals paymentmethod.UserId
... rest of query here ...);
Now this is tickety boo and works as I want it to. The only problem I'm currently having is when schema updates etc. happen (which is relatively frequent as we're in a significant dev phase).
(and finally, the question!)
What I want to achieve (and I've marked the question up as T4 as a guess, as I know that the DBML files are T4 guided) is an automated way when I drag any table onto a data context that the Source automatically picks up the DB name (so will have Users.dbo.UserDetails instead of just dbo.UserDetails)?
Thanks for any pointers :)
Terry
Have a look at the T4 Toolbox and the LinqToSql code generator it provides (Courtesy of Oleg Sych) - You can customize the templates to generate references however you'd like, but I think the problem you're going to run into is that the database name isn't stored in the dbml file.
What you could probably do is add a filter to the generator, perhaps using a dictionary or similar, such that in your .tt file, you maintain a list of tables and the databases they belong to. That way, if your maintenance task is to delete the class from the designer and drop it on again, it will get the right database name.

Resources