Moin: I am to show the field “Blocked” (type Boolean) in the Customer record in the corresponding Contact record. So I first created a flowfield “Customer Blocked” in the table #5054 “Contact Business Relation”. The calcformula for this field looks like this: Lookup(Customer.Blocked WHERE (No.=FIELD(No.))) and it works fine. After this I created another flowfield “Customer Blocked” in the table #5050 “Contact” with the following calcformula: Lookup(“Contact Business Relation”.“Customer blocked” WHERE (Contact No.=FIELD(No.))) unfortunately this field is not updated with the corresponding values when browsing through the records of “Contact”. Anybody out there who can tell what I’ve done wrong or what´s missing? Thank you in advance Alarich
Citazione:
Moin: I am to show the field “Blocked” (type Boolean) in the Customer record in the corresponding Contact record. So I first created a flowfield “Customer Blocked” in the table #5054 “Contact Business Relation”. The calcformula for this field looks like this: Lookup(Customer.Blocked WHERE (No.=FIELD(No.))) and it works fine. After this I created another flowfield “Customer Blocked” in the table #5050 “Contact” with the following calcformula: Lookup(“Contact Business Relation”.“Customer blocked” WHERE (Contact No.=FIELD(No.))) unfortunately this field is not updated with the corresponding values when browsing through the records of “Contact”. Anybody out there who can tell what I’ve done wrong or what´s missing? Thank you in advance Alarich
Originariamente inviato da Alarich - 2004 Oct 04 : 11:13:55
I’m afraid you can’t build a flowfield on an other flowfield. When you browse through Contact, who’s updtating the flowfield on “Contact Business Relation”? Anna
Can you simply copy the business rules from the field on the customer table to the new field?
Because you cannot create a flowfield on a flowfield, I would say like Jonathan, that you could try to create a flowfield in Table 5054 (Contact Business Relation) that directly goes to the customer, as you have the customer no. in Table 5054 if it is a customer relation. Or if BLOCKED is only to be displayed in a form you could use a variable, get the value in trigger OnAfterGetRecord and display the variable in the form (list or card form).
You can use Flow fields in the Flowfields, but there is certain rules. As far as I found is that you can use Lookup and Exist type flow fields in the flow fields. Alarich, I think, you are looking that flow field in the ZOOM. If you put that field on the form, then you will be able to see the values. I will check this again at my side, but meanwhile you can test this. Naveen Jain
Naveen: Thank you for your input. I followed your suggestion and put the “Customer blocked” field from table Contact to the form #5050 Contact Card. Too bad - it doesn´t show any of the checked records. The way I tested it was to run the table #5050. Maybe it is necessary to use the CALCFIELDS statement inside the table Contact but I’ve no idea where. Regards Alarich
Is your Customer No. is always same as Contact No.?
Also Which Navision Version are you on?
You can create your own Lookup function in table 5050 as Function CustomerBlocked(): Boolean Var T5054: Record 5054 IF T5054.GET(No) THEN T5054.CALCFIELDS(“Customer Blocked”) EXIT(T5054.“Customer Blocked”) and use it anywhere. Hope that helps.
Jesus: Thank you! That´s what I was looking for. The only disadvantage: you can’t set a filter. But I can live with it Regards Alarich