Flowfilter Error

I have added a new field to a table because I want to see for a particular PO, how many items have been received into inventory. This new field is a flowfield;

SUM(“Purchase Line”.“Quantity Received” WHERE (Document Type= CONST(Order), Document No.=FIELD(“Purchase Order No.”, Line No. = FIELD("Purchase Order Line No.))).

It has no trouble getting the SUM, but when I “Drill Down” to see the PO lines, sometimes it works okay and sometimes it flags a standard error message:
"The Purchase Header does not exist.
Identification fields and values:
Document Type=‘Quote’, No.=‘xxxxx’
Document Type:Quote, No.:xxxxx

In the flowfield calcformula I have clearly requested Orders only. Why does it even look for Quotes? Moreover, the Quote Document No does not exist, but the Order Document No. DOES exist.

Can anyone help explain this please?
Many thanks!

Here’s what I use to see how much of a po still needs receiving

Sum(“Purchase Line”.“Qty. to Receive (Base)” WHERE (Document Type=FIELD(Document Type),Document No.=FIELD(No.)))

I guess you can just change “Qty. to Receive (Base)” to “Qty. Received (Base)”

I think your problem lies in the whole Line No thing at the end.
Also I guess you can add “Qty. Received (Base)” <> 0 so you don’t get every line

Thanks Harry!
However, what you recommended is not really the same…what I need is to sum per line because a PO may have any number of lines with different items and variants.
I really need to see per PO line, how many have been received. I still get the error.
The strange thing is, the flowfilter manages to get the correct quantity received…it’s the drill down that doesn’t seem to work every time.
If you have any other ideas, please let me know.
Thanks.

I guess i’m not understanding. you want to sum 1 line at a time?

maybe you can explain if you want to access this from the item card???

you did not mention where you want the flowfield.

I will change the Calcformula.

You do realize this will give you what is received and not invoiced because once invoiced the info changes tables to “purchase invoice line” unless you use the reciept lines or item ledger entries.

No I do not want to access this from the Item Card but from another form, custom made, similar to a SO with header and lines.

The lines will show info for different customers, such as SO Nos., SO lines, PO No., PO lines, items, variants, quantities, how many recived, etc.

The flow filter and drill down should work from any form anyway, should it not?

As long as the fields you are filtering on(and ofcourse the flowfield) are in the table inserted on the source expression of the form, yes.

Hi Robbie,

there is a lot of confusion in what you are trying to do. Try to take a step back, and instead of trying to solve this one issue, try to explain what you are trying to achieve.

At first glance, it looks like you are working with something special orders or drop ships. Or maybe even some customization that you have. If so my guess is that you are trying to look at a linked sales line and from that determine the status of a purchase line. If this is the case, explain what the purpose is and what you need to see. Then we can work out how to solve the issue.

My apologies, I did not want to write too much in order to avoid confusion :slight_smile:

Okay, the simplest scenario is this: On the standard Transfer Order the lines also show the SO No., SO Line Nos., PO No. and PO Lines Nos…We want to keep track of items from the time they are received at the factory, transferred to different locations, and to the time they are shipped out to customers. We want to be sure, at a glance, that all items have been received before posting a TO. My solution is a new flowfield which will contain the Qty. Received (Base) on the related PO line.

The SUM quantities seem fine, so it works how we want it to, the problem is, sometimes when one drills down, there is an error message (as stated above). It seems to happen when the Quantity Received <> 0; if the Quantity Received is 0 then the error does not seem to show and you drill down to the PO Line concerned. It is a small problem, but I would still like to find out why it happens. It may be something very simple which I have overlooked. It would not be the first time :slight_smile:

Thanks for all your support.