Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Primary keys...Text or Number?

Featured Replies

Which do you use, and why? Do you use both cases situationally?

I have not developed a standard on which way I choose to go with these. Sometimes it seems like using text is better to me, but I'm afraid I'm not grasping the full ramifications of each.

Please share your ideas!

Hello. I use numbers exclusively. I've read that the index is smaller, and they sort in created order in a dev layout.

Well I prefer TEXT because for all my keys I am using Base36 UID's

http://www.nightwing.com.au/FileMaker/demos9/demo910.html

text is also required if you need to do multi-key (a return separated list of values) say a list of ID's (text or number) to the primary key in another table ( text or number).

Since keys are INTERNAL to the solution there isn't a reason i can think of that requires it to be a number, sequences or sorting can be handled with another field. Such as Invoice numbers (for the user to see, that can be an serialized number field )

As example you will have a UID and a Invoice Number field, invoice line items don't need to be related to the invoice number field - but to the UID.

I love religious debates. :

I used text fields until one night I did a huge data import and sorted by the primary key to ensure the records were imported in creation order.

It was a long night.

I should add that if a multi-key field needs to relate to the numeric key, the multi-key needs to set to text.

... and then I realise that *everything* I've just posted was already said by Stephen and Barbara. :

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.