So you have a new table that you want to associate with InventLocation. You create the table and add a field to the table. Let's call it TestTable and the field is GroupId. Now you want to add groupId to the inventLocation table and add it to the inventLocation (warehouse) form and get the drop down to show all the groupIds in the TestTable to choose from.
In TestTable, create an index with your GroupId field in it. It should not allow duplicates and it should be used as the primary and clustered index of your table.
Now go to the InventLocation table and create a new relation, choose foreign key relation as the type of relation you are adding. The related table should be TestTable and then choose your index that you created as well.
Once you save this, it will add a field to InventLocation for you and will also create an Index for you. If you want to allow duplicates in InventLocation, you will have to go to the index it created and set allowDuplicates to Yes. You can delete the index if you don't want it though.
That's it!
No comments:
Post a Comment