Monday, December 3, 2007

How To: Create a multi-column unique key

Here's how to define a multi-column unique key using DesignDatabase. This isn't rocket science, but if you're like me then you just kept doing this using RefineTables and never really bothered to learn to do it in DesignDatabase (which is much easier):

- Select your table in DesignDatabase and choose the Keys frame
- Click [New] at the top of the screen
- Name your key in the Key/Column field and check the Unique box
- Right-click on the Key/Column field and select "Change key"
- Select the column(s) you wish to comprise your unique key and click [Save and return]

You may also need to change the priority of your key if you intend it to be used in a POST statement in TFL or for AutoAdd update behavior. Higher-priority = lower number (i.e. 100 is a higher priority than 200).

0 comments: