Skip to main content
Solved

using $Filter with a numeric value field

  • December 9, 2022
  • 4 replies
  • 247 views

Hi,

 

I’m tryiung to do a GET request from:

acumatica/entity/Default/18.200.001/invoice?$filter=CreatedDateTime gt datetimeoffset'2021-09-10T00:00:00.000-00:00' and Status eq 'Open'

 

That returns the open invoices starting one date.

Now I want to add a Balance component but I cannot make it works, I tried: 

CreatedDateTime gt datetimeoffset'2021-09-10T00:00:00.000-00:00' and balance gt 0

ALSO

CreatedDateTime gt datetimeoffset'2021-09-10T00:00:00.000-00:00' and balance=0

 

With no success, I’m pretty sure it is a simple thing, but I cannot find it

 

How can I do it?

 

Thanks,

Ignacio

Best answer by Samuel Olivier Lavigueur

Not sure the issue that you are facing here.

Is it not working because of an error or because nothing is being returned?

 

If it is because of an error like the following :

"A binary operator with incompatible types was detected. Found operand types 'Edm.Decimal' and 'Edm.Double' for operator kind 'GreaterThan'.",

or

"Type conversions not supported",

 

Adding the letter ‘m’ to your integer can resolve the issue :

CreatedDateTime gt datetimeoffset'2021-09-10T00:00:00.000-00:00' and balance gt 0m

View original
Did this topic help you find an answer to your question?

4 replies

Samuel Olivier Lavigueur
Acumatica Moderator
Forum|alt.badge.img+2

Not sure the issue that you are facing here.

Is it not working because of an error or because nothing is being returned?

 

If it is because of an error like the following :

"A binary operator with incompatible types was detected. Found operand types 'Edm.Decimal' and 'Edm.Double' for operator kind 'GreaterThan'.",

or

"Type conversions not supported",

 

Adding the letter ‘m’ to your integer can resolve the issue :

CreatedDateTime gt datetimeoffset'2021-09-10T00:00:00.000-00:00' and balance gt 0m


  • Author
  • Freshman I
  • 2 replies
  • December 10, 2022

Thanks for that answer, all I was missing was the m at the end


  • Author
  • Freshman I
  • 2 replies
  • December 10, 2022

Hi,

 

Now I have another question, how to include the details, I tried

/entity/Default/18.200.001/invoice? $expand=Details&$filter=CreatedDateTime gt datetimeoffset'2021-01-10T00:00:00.000-00:00' and balance gt 0.0m

 

but I got no change from when I call it without it

 

Thanks again,

Ignacio


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 702 replies
  • December 12, 2022

Hi @ignacio85 

The issue with the Endpoint URL. Extra space was added between the? and $. Please remove the space and try.

entity/Default/20.200.001/invoice?$expand=Details&$filter=CreatedDateTime gt datetimeoffset'2022-01-10T00:00:00.000-00:00' and balance gt 0.0m
 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings