Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Primary Key: How to define this in FM


Recommended Posts

I do a lot of work in Microsoft Access and SQLServer applied to a very large, complex schema and multiple database instances. I'm evaluating FileMaker as a protable analysis tool to assist me when I'm away from the network.


I often define a compound primary key -- multiple fields declared as PRIMARY KEY -- which are used to define a unique record. These can be composed of both NUMBER and TEXT fields.


I cannot determine how to define this FM Pro 8.5. It is possible to contrain the datatype, set the equivalent of the DDL "NOT NULL" declaration, but no GUI tool for declaring even one field, -- much less two or more fields -- as the primary key. Perhaps primary key is not in the vocabulary of FM?


The subject of primary keys pops up here or there but the question never seems to be answered directly. Does anyone have an insight into the creation of primary keys for a table?





Link to comment
Share on other sites

in filemaker, any field can act as primary key field, there is no formal difference. if you make it an auto-enter serial it will be unique. If you want to use a compound key just concatenate the fields and use the resulting calc field as key. Just make sure it can be stored & indexed or FM will not accept it as key to a relationship.

BTW Filemaker relationships can be defined with multiple predicates (field A AND Field B), just select the fields on either end you wish to use. since this option arrived in v7 I have never made a compound key again (i think).



ps I hope I'm not confusing things, but in fm the key is defined when you define the relationship and not beforehand when defining the field. most of us I guess just declare a field to be a key by giving it a keyish name.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use