Skip to main content

Hi, 

I’m trying to call this API to get data for multiple countries and attributes in one call:

/AttributeValueHandling.svc/AccountingAttributeSet(Company='{Company}',Attribute='{Attribute}')/AccountingAttributeValueArray

 

I’ve tried to use OData alias without succes:

/AttributeValueHandling.svc/AccountingAttributeSet(Company=@comp,Attribute=@attr)/AccountingAttributeValueArray?@comp=@"1","2","3","4"]&@attr=@"A","B","C"]

 

Is there some way to get this to work in one call? Using alias or some other way?

 

Best regards

I have never heard about that being possible, so you have to do one call per company and attribute, in this case. It's because of the nature of this page being a master/detail page. If there had been a list page will all attributes, that could have been used.

 


PS. Perhaps you can create a simple query in Query Designed to get the data you want, and then use the resulting projection that should be created to support it?


Thanks! We’ll give the Query Designer option a shot.

 

Best regards


Hi ​@AndersHallberg 

I don’t think it’s allowed to have multiple values in the path parameters.

May be the reference for AccountingAttributeValue could give you the same results you wanted?

Eg:

AttributeValueHandling.svc/Reference_AccountingAttributeValue?$filter=((Company eq '1' or Company eq '2') and (Attribute eq 'A' or Attribute eq 'B'))


Thanks ​@dsj ,

 

That’s what I was looking for.

 

Best regards


Reply