Creative Wisdom ยท FileMaker Pro tipsArchive

Text field and number field

Chong Ho (Alex) Yu, Ph.D., MCSE, CNE (2001)

Question

ID numbers and phone numbers are nominal data rather than interval data (i.e. you cannot do calculation with ID numbers) Can I still use a number field instead of a text field to carry nominal data?

Answer

Yes and no.

Do not use a number field for ID numbers. If the ID number starts with a "zero" such as "0165," the number field will truncate the "zero" and store it as "165."

Do use a number field to indicate group membership or flag. For example, you can use the values "member" and "non-member" for a text field named "member," and the values "complete" and "incomplete" for a flag such as "completed assignment 1?" However, using text data for these fields have two shortcomings:

  • It is harder to summarize the text-based data. On the other hand, if I use "1" and "0" instead, I can sum the total to find out the frequency count of members or the number of people who completed the assignment.
  • When the text-based data for membership or flag are displayed in a table, it is difficult for me to see the big picture. Please compare the following two tables. Which one is easier to look at?
Exercise 1Exercise 2Exercise 3Exercise 4Exercise 5Exercise 6Exercise 7
1111100
1010101
1000100
1111100
1000010
1000111
Exercise 1Exercise 2Exercise 3Exercise 4Exercise 5Exercise 6Exercise 7
completeincompleteincompleteincompletecompletecompleteincomplete
incompletecompletecompleteincompletecompleteincompletecomplete
completecompletecompletecompleteincompleteincompleteincomplete
incompletecompleteincompletecompleteincompletecompleteincomplete
completecompletecompletecompletecompletecompleteincomplete
incompletecompleteincompleteincompleteincompleteincompleteincomplete

It is important to note that a validation rule must be used in a number field. Without a validation rule, a number field can accept text input. You may think that there is no difference between "thirty-six" and "36." However, if a calculation field uses a number field as a criterion for decision-making, the calculation field will treat the number field with text data as empty.