Skip to main content
Solved

Filter, select, and expand

  • July 21, 2023
  • 7 replies
  • 1364 views

jamest
Varsity I
Forum|alt.badge.img

Hi all, 

We’re trying to create integrations and during the testing, I’m running into some issues with the api parameters. Does Acumatica support the following? 

 

entity/default/22.200.001/vendor?$filter=VendorID eq '501446'&?$expand=MainContact,MainContact/Address

I find that when I try to use filter or select when expanding that I get unexpected or limited results. Is this a limitation of the api or is my syntax not correct?

I’m trying to get an efficient query that gets a couple of fields on the vendor entity and a few off the expanded entities. I have been able to remove filter, select, and expand and get the entire data set, but I don’t want that waste in the automation. 

 

Thanks in advance!

Best answer by Leonardo Justiniano

@jamest 

 

Insignificant but you have an extra ? in the URL

 

 

7 replies

Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+4

Hi @jamest 

 

I tested your call and works fine. It is limited by the mapping you have in the endpoint.

 

As you can see with the Main Contact, not all the fields are mapped:

 

If you want more fields you can extend the endpoint to map additional fields you need.


jamest
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • July 21, 2023

Thanks, @Leonardo Justiniano 

I think I get it and it looks like my fields are mapped. The query works fine with just the expand, but when a filter or select is added, it doesn’t work completely. 

Am I missing something?

First is just the expand. Second is the same query with the filter. 

 


Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+4

Hi @jamest 

 

In my test I added a “filter” to retrieve 1 record and works fine.

 

and

 

The only difference is my expand clause is before the filter. I know it should not matter, but maybe in this case it does.


jamest
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • July 21, 2023

Interesting, I tried that before and just verified it again mirroring your structure. I still get back all the records in the entity.

Also, thank you for your time answering this thread. I appreciate it!

 

All records
​​​​​​
Here is the valid record

 


Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+4

@jamest 

 

Insignificant but you have an extra ? in the URL

 

 


jamest
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • July 21, 2023

@Leonardo Justiniano That was it! Much appreciated, I would think the query fail if there was an out of place parament indicator, but I guess not. Thanks Leo!


Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+4

Happy to help!

Remember to set it as your answer 😄