Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Search for a configuratiion item with 2 criteria

SOLVED
Go to solution
Highlighted
kh_3
Super Collector

Search for a configuratiion item with 2 criteria

Hi,

I want to search for a configuration item with 2 search criteria.

eg:All configuration items with
search code = "something" AND
category = "something"


I know I can create a where claues and do one by one.... But how to do it in one go with both search criteria?
Any help?

Thanks
4 REPLIES
Ruth Porter
Honored Contributor

Re: Search for a configuratiion item with 2 criteria

Hi there,

I am not sure I understand - Adavnced find lets you do this. Can you post a bit more information?

Regards

Ruth
http://www.teamultra.net
kh_3
Super Collector

Re: Search for a configuratiion item with 2 criteria

I'm developing an external application using the webapi.

and basically trying do the above search using the functions in webapi.

Thanks
Vasily Kamenev
Honored Contributor
Solution

Re: Search for a configuratiion item with 2 criteria

Hi
IConfigurationItemWhere ciListWhere = session.getConfigurationItemHome().createConfigurationItemWhere();
ciListWhere.addCriteriumOnSearchcode(String value);
ciListWhere.addCriteriumOnCategory(ICICategory value);
IConfigurationItem ciList = session.getConfigurationItemHome().findConfigurationItem( ciListWhere );

Vasily
kh_3
Super Collector

Re: Search for a configuratiion item with 2 criteria

Ohhh so you can add many critieria to the same where.. Thanks a lot.. I'll try this.
//Add this to "OnDomLoad" event