AX / D365FO – OR Condition in a Query Range object

Do you want to add an OR Query condition like (Field1 > 0 or Field2 >0) inside a complex AX SQL Statement using a Range object? Follow these steps :

For this example I will use InventSum Table

Add a range in the Data source

Name it PhysicalInvent (no matter what’s the name it’s just a placeholder)

In the field property choose PhysicalInvent (it’s another placeholder) and in the value write : ((InventSum.PhysicalInvent > 0) || (InventSum.Ordered > 0))

The SQL query result will be this

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s