Basic Boolean Flowfield Help

Hello, I’m just starting out examining the different uses of flow fields and i’ve run into an error that i don’t understand… i’ve created a boolean flowfield in the Item Ledger Entry table…here’s the calcformula: Exist(“Sales Header” WHERE (Customer Source=CONST(I),Applies-to Doc. No.=FIELD(Document No.))) It saves and compiles, but when i run the table and try to access the field…it pops up an error saying “the calcformula should start with Sum(” everything i’ve seen in my training docs say that boolean flowfields calcformula property should start with “Exist(” i’m guessing i’m missing something obvious…but the training docs don’t seem to have much in the way for examples for boolean flowfields…what gives? Thanks, -James

What are you actually trying to display in the flowfield, basically it just looks all wrong.

quote:


Exist(“Sales Header” WHERE (Customer Source=CONST(I),Applies-to Doc. No.=FIELD(Document No.)))


Hi James, I have to agree with David. This is total gibberish… Have you created the field “Customer Source” yourself? What is constant “I” ? Even if it worked, I don’t see how you’re flowfield ever would display anything but false - you’re mixing not posted data (Sales Header) with posted data (Item Ledger Entry) and I don’t even want to know why you’re using “Applies-to Doc. No”.

Ok guys, it’s his first posting… So I will try to explain the TECHNICAL reason for your error message, James. A flowfield of type Exist… should have the property Editable=No. The FlowField of type Exist just shows you if in the underlying table there is at least one record fulfilling the criteria defined in the CalcFormula. A FlowField of type “Sum…” can be editable. This is used in fx. decimal flowfields to sum up a decimal field of entries of an underlying table and displaying them. If the user changes the sum displayed in the FlowField manually, than a new entry with the difference between the old sum and the new sum will automatically be created in the underlying table. This is a standard Navision feature that only works with type “Sum”. All other FlowFields should be Editable=No. You can try this functionality for example in the Resource Capacity form (form 213). You see the capacity per resource and period of time. On the right hand side you can drill down the capacity field to see the resource capacity entries that sum up to the capacity shown in the form. You can change a value in the form and drill down again to see the newly created entry. Hope I could clarify your confusion. Else I must agree with the others that your CalcFormula does not seem to make any sense…

Beaver, You’re absolutely right. I missed the part “…and try to access the field”. James, sorry if my previous posting was a bit harsh in tone… [:)]

First…let me say thanks for all the replies…and like i said…i’m just starting out my training so go easy on my guys… Steffen, in an attempt to decode the gibberish…Yes…the “Customer Source” field was added to the sales header table by a previous NSC that went out of business…they use that field to specify if a customer came from the internet (I) or mailorder (M) or phone (P)…this is the only place they stored this information in the database…I assumed that “Customer Source=CONST(I)” would match records that have an “I” in that field…i also assumed that “Applies-To Doc. No.” would provide a usable link between the “item ledger entry” table so we could tell if an item was sold to an internet customer…given that the only place they stored the customer’s origin is in the sales header table…i don’t see a very sane way to report on their internet sales. Beaver, Thank You…that is exactly what i was wondering about…that makes total sense that it’d have to be set as read-only…because the only time it would error is when u click on it. Thanks Again, -James

Hi James, First let me say I’m glad we haven’t skerd you off[:)] Secondly you have to realize that the Sales Headers that “fed” the Item Ledger Entries probably are long gone - they have been posted and are now Sales Invoice Headers (table 112), so that’s basically where you have to look. If your previous NSC didn’t replicate the field “Customer Source” into (at least) this table on posting, I’m afraid they did a bad job, which leaves you with a tracing task now (that can’t be solved with flowfields).