Skip to main content
Solved

Filter by LastModified with another datetime field


anahizentella94
Jr Varsity III
Forum|alt.badge.img

I have a datetime field in Stock Item, this is the last time that I have exported the Stock Item Data to an external system.

Is there a way that I can filter StockItem by comparing LastModified with the Exported date?

Something like $filter=LastModified ge Exported.

 

There are many examples using datetimeoffset buy in this case, the date to compare is in the stock item.

 

Best answer by jinin

Hi @anahizentella94 ,

As of my knowledge, Acumatica's REST API may not directly support comparing two fields in the $filter condition. In RESTful APIs, the standard OData query syntax is often used for filtering, and the OData specification primarily supports comparisons between a field and a constant value.If comparing two fields directly in a filter expression is not supported.

 

 

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

3 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 693 replies
  • Answer
  • January 8, 2024

Hi @anahizentella94 ,

As of my knowledge, Acumatica's REST API may not directly support comparing two fields in the $filter condition. In RESTful APIs, the standard OData query syntax is often used for filtering, and the OData specification primarily supports comparisons between a field and a constant value.If comparing two fields directly in a filter expression is not supported.

 

 


anahizentella94
Jr Varsity III
Forum|alt.badge.img

Thanks for the update, I'll try another approach 


Forum|alt.badge.img+6
  • Captain II
  • 550 replies
  • January 8, 2024

One thing that you can do is to create a GI and then expose that GI to the OData interface. The GI can handle that type of filtering requirements and the external system doesn’t need to worry about that.


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