Difference between
calculation field,
auto-enter by calculation,
and layout linking field

Chong-ho (Alex) Yu, Ph.D., MCSE, CNE, CCNA

Question:

What is the difference between a calculation field, a text/number field with auto-enter by calculation, and a layout linking field? Which one should I use?

Auto enter by calculation in File Maker Pro

Answer:

The first two field types look similar but indeed their behaviors are different. A calculation always update its value whereas a text/number field with auto-enter by calculation computes the value at the first time only. In the following example, the calculated field determines its value by adding the value of two other fields. You can create a number field and enter the same formula into auto-enter by calculation. The result will be the same in the first entry. However, when later the value of Q2 is changed, the number field is unable to update its value.

 

First entry

Filed Type

Q1

Q2

Formula

Total

Calculation

10

10

Q1 + Q2

20

Number (auto-enter)

10

10

Q1 + Q2

20

Update

Filed Type

Q1

Q2

Formula

Total

Calculation

10

20

Q1 + Q2

30

Number (auto-enter)

10

20

Q1 + Q2

20

You may think that a text/number with auto enter by calculation is useless. Not exactly. According to Hegel, whatever exists is rational! Indeed, this feature is useful in some situations. For instance, if you create a computer lab client usage database to record the logout date of the client, but you will edit these records later, then using a date field with "auto-enter by modification date" does not work. It is because whenever you edit the record, the new modifcation date will overwrite the logout date. In this case, you should do the following:
  • Create a field named "logout."
  • In the last html page that the client logout, create a "logout" radio button to make the value "yes" submit to the field "logout."
  • Create a text field named "logout_date."
  • Go to Auto Enter and check Calculated Value.
  • In the Calculation formula box, type: If (logout = "yes", Today, "").

When the user clicks on the "logout" button, the condition (logout="yes") is satisified and today's date is registered. Since the logout date is entered once only, the subsequent editing will not affect this permanent entry.


FileMaker Pro layout linking fieldAnother feature that looks like a calculation field is the layout linking field. In the layout mode when you double click a text or a number field, a popup window lists the value options that can be placed into the target field.

You can choose to link the field from the same database or from another database by establishing a relationship. For example, if you links Database 1 and 2 by ID, in Database 2 you can create two fields called "Last Name" and "First Name," and then import the name from Database 1 by this layout linking method.

By first glance it looks like a calculation field. However, I advise against using this method. Remember that a layout is nothing more than the appearance of a database. How the field looks like in the layout mode is not necessarily the same as what the field actually contains in the browse mode. In this case, the linking field only shows the field value of another database.

You cannot do any manipulation of those fields because the values are not there at all. For example, the value appeared on a linking field cannot be exported to another calculation field. Let say later you want to create a field called "Full Name" by combining the values in "First Name" and "Last Name," the calculated field would not show any data at all.


Navigation

FMP Tips Contents

Other computer tips

Search Engine

Credit/Copyright ©

Simplified Navigation

Table of Contents

Contact Me