I have created Table X, and added 3 new fields to the customer table, all looking up to this table : Field x1, x2, x3 Rather than have 3 seperate tables for each field, what i thought about doing was filtering field x1, so that on lookup say names 10…19 were shown, field x2, 20…29 and field x3 showed 30…31. This way, it would “force” the inputter to be the same data in the same fields, rather than mix and match! My first thought was to do this via a lookup, but when looking up, it said it required a calcsum I then thought about a setfilter, but not being too experienced wasnt entirely sure on how to do! Are my thoughts the best way to acheive this, and if so, what is the best way to acheive it?
What is the designated “FieldClass” for the fields you created ? I would suggest that you check the fields “Item Category” and “Product Group” in the item table and compare those with your new fields.
It sounds to me like you are trying to create the relationship by making the fields a flowfield, which is typically not the right way to create a relationship. To set a relationship you go into the property page of the field: - open properties from the field - click the elipsis button (the … button) - set all relevant properties For a simple relationship, you’d just set the table property. This works if the table you link to has a single primary key field. It gets more complicated when you start linking to other fields in the primary key, in which case you’d also set a filter. But this is where you’d set the relationship. Play around with it and get a feel for how it works.
Thanks for your replies. Re the Field Class : I orignally had this as normal, and tablerelation set as the “lookup” table. This worked fine. When I tried to set filtering this is when i changed to a flowfiler. I also changed the table relation to include a table filter, however this did not seem to acheive anything. The lookup table simply contains a code field (the primary key) and a description, and it is the code field which i am trying to filter on. The data shows a group to which the customer belongs to, only we have customers which belong to more than one group. This is why I created the extra 2 fields. Rather than have 3 separate tables, i wanted to keep all the data in the same table, and just restrict what is available when the user selects the field lookup, based on the code number. Again, thanks for your help.
The easiest way to achieve what you want is to use the contacts in Navision. These can be assigned to some kind of “Groups” using a sub-table (one-to-many relationship).
What you are describing is a many-to-many relationship (one Item can have more than one group, and one group can have more than one Item). In Navision you accomplish this by having three tables. Two tables to store the entities that you wish to create the relationship for, and one table to link them together. An example of this is for instance the Item Unit of Measure table. You have Items on one hand, Units of Measure on the other, and you create the relationship by entering items and units of measure in the Item Unit of Measure table. This is the only way in Navision that you can create a many to many relationship. The table in between should have the primary key fields of both tables as the primary key (so in case of the Item Unit of Measure table, the Item number and the Unit of Measure code are the primary key). So when you are on the Item Card and you want to see all Units of Measure that belong to the Item, all you have to do is lookup into the in between table, filtered by the Item number. You could do a similar lookup from the Unit of Measure table, for instance a list of Items that this unit is used on, by opening the list form, filtered on the unit of measure code.