Loading ...

Fbql Brackets

Hello everybody,

today I want to speak about one very interesting feature of FBQL, which I don't know if exists in BQL. Function Brackets!

Take a look on following code sample:

var bracketsDemo = SelectFrom<SOOrder>.InnerJoin<SOLine>.On<SOLine.orderNbr.IsEqual<SOOrder.orderNbr>>.InnerJoin<SOShipLine>
	.On<SOShipLine.origOrderNbr.IsEqual<SOOrder.orderNbr>>.Where<
		Brackets<SOShipLine.confirmed.IsNotNull.
			And<SOShipLine.baseOrigOrderQty.IsNotNull>.
			And<SOShipLine.completeQtyMin.IsNotNull>.
			And<SOShipLine.confirmed.IsEqual<True>.
				Or<SOShipLine.confirmed.IsNull>>.
			And<SOShipLine.baseOriginalShippedQty.IsGreater<SOShipLine.unassignedQty>.
				Or<SOShipLine.baseOrigOrderQty.IsLess<SOShipLine.baseOriginalShippedQty>>>>.
		Or<SOShipLine.baseOrigOrderQty.IsNotNull>>.AggregateTo<GroupBy<SOOrder.orderNbr>,
		Min<SOOrder.curyDiscTot>>.OrderBy<SOOrder.curyFreightAmt.AscSOOrder.curyDocDisc.Desc>.View.Select(Base);

as you can see from the code, now in FBQL if you need to have Or operator, then as anohter option you may use Brackets.

Ready to Enhance Your Acumatica Experience?

If this deep dive into FBQL functionality sparked new ideas for your Acumatica development, why not take it a step further? We specialize in customizing Acumatica to fit your business's exact needs. Whether it's leveraging advanced features like Brackets or developing unique workflows, we're here to help!

Drop us a request for your custom development needs, and let's discuss how we can optimize Acumatica for you.