hougaard / Simple-Object-Designer

Issue tracking for the Simple Object Designer for Business Central
7 stars 0 forks source link

Flow Field to sum total qty released from Blanket PO #342

Closed ScottB-Ronco closed 5 months ago

ScottB-Ronco commented 5 months ago

Hello I am trying to create a flow field that will sum up all the quantities on the Purchase lines by item that were released from its related blanket order.

So we have a blanket order with several lines with different items. Each time we go to create a PO from the blanket order and release qty from it we want to sum up all purchase lines for the item where it relates to that blanket order line.

So I created a flowfield to sum the quantity from the purchase line table and then put the following flowfield filters

Filter Field No. | Filter Field | Filter Type | Filter Value | Field Value Field No. -- | -- | -- | -- | -- 1 | Document Type | Const | Order |   5 | Type | Const | Item |   97 | Blanket OrderNo. | Field |   | 97

However after publishing it is summing all PO's & All Items.

I know it is problem with the filters, just not sure how to resolve this.

Thanks Scott

ScottB-Ronco commented 5 months ago

OK so I got this working as well I had to change the filter for Blanket OrderNo. which is on Purchase Line to match against No. field which is on Blanket Purchase Order line.

I also had to add field match of Item No. to Item No. between blanket order line and purchase order line in order for it to filter only for said item. So the filters are now as follows

Filter Field No. | Filter Field | Filter Type | Filter Value | Field Value Field No. -- | -- | -- | -- | -- 1 | Document Type | Const | Order |   5 | Type | Const | Item |   6 | No. | Field |   | 6 97 | Blanket OrderNo. | Field |   | 3