Skip to main content

Hi Everyone,

Have an issue with filtering a GI through the REST API.

Below is the setup for my endpoint filter.

And this is my request body

I’m getting the below error 

If I send a word like “test” instead of the actual ID then there is no error however if I send a number formatted as a string then it isn’t happy.

Has anyone seen this before / know a fix?

@matthewgerdan I understand that you provided the StringValue in the endpoint but can you please also let us know what is the datatye that you mentioned in the code level?

I’m assuming that the code level and data type were different, hence you are getting this issue.


@matthewgerdan I understand that you provided the StringValue in the endpoint but can you please also let us know what is the datatye that you mentioned in the code level?

I’m assuming that the code level and data type were different, hence you are getting this issue.

Hi @Naveen Boga I've included screenshots of the DAC, GI Parameter and table schema, they are all set up as strings, this field is a key field so I’m not sure if that might be causing an issue.

 


@matthewgerdan  This is wired !!

All looks good to me except that field INPUT MASK, you provided 99999…., which can allow only digits. Can you please change this input mask and verify?

 


@Naveen Boga No Luck ☹️

 


@matthewgerdan Okay!!

Can you please share the GI?


@Naveen Boga I’ve attached the RPX as XML is this what you needed?


@matthewgerdan I was not able to import this GI for some reason and getting below error.

 


@Naveen Boga It won’t let me upload it in RPX however the GI is using a customer table 

 


@matthewgerdan Thanks for sharing the screenshots here and all looks good.

Do you have any logic implemented in the graph and assigning values?


@Naveen Boga Nah the graph only contains a couple views 

 


Hi @matthewgerdan were you able to find a solution? Thank you!


@Chris Hackett Unfortunately, no.

I’m pretty sure that it has something to do with the field being filtered being a key field, I have another request that also passes a number as a string and has no issue however in that case the field is not a key.


Are there more than one result using that ID?  If it's a key field it is expecting a single response.  If you send "123" does it give the same error? 


Hi @bryanb39, using 123 instead of an actual number worked however all the keys in the DB are unique.

 


A couple of ideas

Could this be a naming convention issue I notice your Field Name for the table is ShopifyLocationID and the name of the Parameter for your GI that is used in the condition is also ShopifyLocationID… could it be getting confused?

By that I mean how is the Parameter vs the Field Identified in your Endpoint Mapping (I see in the first screen shot the parameter declared as the Filter but can’t see any more than the “Shopify Location ID” in the Mapped Field)…

I would try renaming this filter/remapping endpoint and see if you have the same issues…

The other option is I noticed you have this exposed via oData you could try filtering it in the URL parameter call and see if you get a similar error there, might give us a different error message to try to help find the issue...


Hi there,

I am working with the Rest API and ODATA4. to pull data from Acumatica.

The query syntax allows for the inclusion of a $filter parameter in the REST query to limit the data returned.

In the video presentations I can see a few of the comparisons supported: eq for equal, and I think that it does gt and lt for greater than less than etc - but I’m wondering if there’s some comprehensive documentation anywhere that would describe all the different types of filtering you could do for example “in” (as like a sql “in” statement) would be very useful. A search on the website didn’t reveal anything.

Many thanks in advance,

Daniel Graham


https://www.odata.org/documentation/odata-version-3-0/url-conventions/


Thanks very much for this - that’s hugely helpful.

Daniel Graham


Reply