Cancel
Showing results for 
Search instead for 
Did you mean: 

SOA: Getting all the items with a given attribute set to a value.

Hello.

 

According to the API documentation, getItemFromAttribute should be used:

"This service retrieves Item and its related ItemRevision objects based on the supplied attribute key-value pairs supplied in the infos list."

 

But further down, at the Parameters documentation, it states:

 

"infos - The list of attribute value keys for the retrieval. The attributes must be the unique key attributes of the class. Currently, only item_id attribute should be used."

 

I have been running some tests and this seems to be the case, the only attribute I can check for equality is item_id.

 

Is there an alternative method to get all items which have an attribute set to a value? I am trying to locate all the items containing the attribute "FX_MyAttr" with a value of "HelloKittyRulesBad" with no luck for the moment being.

 

Have a wonderful Autum day.

 

 

2 REPLIES

Re: SOA: Getting all the items with a given attribute set to a value.

Solution Partner Legend Solution Partner Legend
Solution Partner Legend
I could not find an API to search Items with custom attribute.
Alternatively, you could create a saved query and execute using SavedQueryService.ExecuteSavedQueries
OR
execute a search using SavedQueryService.ExecuteBusinessObjectQueries (Saved Query not needed)
Highlighted

Re: SOA: Getting all the items with a given attribute set to a value.

Hello Amol,

I was solving the problem by executing a saved query, but I wondered if it were possible to locate the items by using the Core API. ExecuteBusinessObjectQueries is indeed a good alternative approach.

 

Thank you! Let the Kudos shine for you. :)