Newbies MPFogarty Posted March 28, 2002 Newbies Posted March 28, 2002 Can someone explain what a multi-key is, how it works, and when it's best used?
andygaunt Posted March 28, 2002 Posted March 28, 2002 Mike, a multi Key is used when you relate a lot of information from one database to another (or itself). An example is when you copy all id fields for a found set and paste in a global field. This field relates to the related id field, allowing you to display all matching records at once. A Compound Key is used to change the displayed records in a field, based on certain information. These are typically formed of globals and a calculation on the left hand side of the relationship and a calculation field on the right. An example would be an inventory portal. On the right you have the product type. Now you can display all of these records with a constant relationship, but if you want to filter the portal to only show a particular product type then you create a calculation field. i.e. Product Type & " " & "ALL" What this gives you is a two line result of the product type and all. Now on the left hand side you have a global. Set it to all and the portal shows all records, but change it to a product type and the portal filters to only display those products. This can be taken as far as you like. For example say an activities database. You may want to filter by activity date, activity for, activity type. But you also want to filter by activity for and activity type or activity for and activity date. This is where the calculation becomes more complicated. Anyhow, I hope this has helped you to better understand the basics of multi and compound keys for relationships. Once you start using them, the possibilities are endless.
Alan Betts Posted March 31, 2002 Posted March 31, 2002 Multi line keys are also useful for grouping records in a related database For example: Two databases, one with your contacts and one with your groups. You wish to create a group of contacts. A group of contacts is arbitrary, no associations by category or whatever, just a set of contacts picked at random. The contacts file has a Contact ID field and Group ID as does the Group file. Group file also has a Group name field Both files also need a global field for storing up the ID's, called such as gContactID Both files have a calculation field set as 1 called Pipeline. (A constant) Create relationship between the two files based on Pipleine (e.g. where constant in each record = constant in each record :: hence pipeline and will be used to pass information between two files where no usable relationship exists) Create relationship in Groups called Related Contacts where ContactID = Contacts: ContactID In the Groups file make a script: New Group steps: New Record/request Set field - gContact ID : Pipeline::gContactID Set field - Contact ID : gContactID Create a script called "make group" in Contacts file. step: Go To Record (first) Set field - gContactID : Contact ID Loop Go to Record (Next, Exit after last) Set field - gContactID : gContactID & "
Recommended Posts
This topic is 8329 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now