Hi, I have a scenario where I have a boolean field on the sales line table to check if the line has been printed in a specific report. What I need is another boolean field on the sales header table which will be ticked if all the line fields are true. My question is, can this be done with a flow field? Mank Thanks
HI, why do u want to do it with the help of Flow Field? Rajan
I think you can use a FlowField like EXIST(“sales line”.“boolean field” WHERE AND “sales line”.“boolean field” = FALSE) IF Yes, there is at least one that have not been printed. Hope that helps
Im mainly concerned about speed, there will be on average about 500 lines per header.
Thanks, I experimented with the flowfield with little success so I ended up writing a function to do the job, due to customer timescales. Many Thanks Again.
Assume that your field in sales line is named “Printed”, then you could create a flow field in the Sales Header with the CalcFormula: -Exist(“Sales Line” WHERE (Printed=CONST(No))) If a line with Printed=No exists, the expression will return -(TRUE) (which is FALSE) if no line with Printed=No exists, that means all lines are printed, the expression will return -(FALSE) (which is TRUE) So your tick in the Sales Header will be set correctly. You can delete your function now…
In 3.60 (Might be earlier, but 3.60 is what I have open), Navision does this with the “Completely Invoiced” field on the Sales Header/Lines.
Right, the Min(“Sales Line”.Printed WHERE ()) works as well since FALSE < TRUE…
Any flow field that can be created in a header, can also be created in the lines. With C/Side, and a reasonable cache size, this should not give major performance issues. Be careful with SQL though. In general though SQL has no real performance problem with flowfields, its more a SumIndex issue.