Solved

Generic Inquiry Row Style

  • 26 April 2024
  • 4 replies
  • 32 views

Userlevel 4
Badge

We would like to add a row style to a Generic Inquiry where if the SOOrder.OrderDate within 3 days of shipping AND SOShipment.ShipDate <= 3 days from the SOOrderDate show the row as ‘green40’ else show as ‘red40’. Unfortunately using Is Between can’t be used for the row style.

icon

Best answer by lauraj46 26 April 2024, 17:31

View original

4 replies

Userlevel 7
Badge +7

Hi @wmatthews1877 ,

Instead of ‘between’ you can just specify both conditions and combine with the ‘and’ operator, something like this:

=iif(datediff(‘d’, [SOOrder.OrderDate],[SOShipment.Shipdate])>=-3 and datediff(‘d’,[SOOrderDate],[SOShipment.Shipdate])<=3, ‘green40’,’red40’)

Hope this helps!

Laura

Userlevel 4
Badge

So far, so good. Thank you.

Userlevel 4
Badge

Thank you for your response, but now it gets a little more complicated. Here is the code

as we have it,

=iif(datediff(‘d’, [SOOrder.OrderDate],[SOShipment.Shipdate])>=-3 and datediff(‘d’,[SOOrderDate],[SOShipment.Shipdate])<=3, ‘green40’,’red40’)

and the added complication is if the SOShipment.ShipDate is < than the SOOrder.RequestDate. There are some instances where the SOOrder.RequestDate is in May, but the SOShipment.ShipDate is on the 29th of this month. If that has happened, then technically it should still be green, and not red.

Userlevel 7
Badge +7

Hi @wmatthews1877 ,

You can combine whatever criteria you like in the condition statement, just be careful with the parentheses for order of operations.  Something like this may do it:

=iif((datediff(‘d’, [SOOrder.OrderDate],[SOShipment.Shipdate])>=-3 and datediff(‘d’,[SOOrderDate],[SOShipment.Shipdate])<=3) or [SOShipment.ShipDate]<[SOOrder.Requestdate]), ‘green40’,’red40’)

Hope this helps!

Laura

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved