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.

basic question about relationships

Featured Replies

I am trying to figure out how to auto-enter a date that's a week later than the previous record & found this to use as an example:

http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000333

I don't understand the relationship in the file, though. There is only 1 table; how was the "Previous Record" table created?

Also, what is the difference between --< and >--<

thanks!

There is no previous record table. This is a type of self-join relationship because it relates within the same table. The 'serial' field is set up to autoenter a sequential serial number, and the 'previous serial' field is set up to autoenter the value of the serial field minus one. Hence the 'previous serial' field will contain the same number as the 'serial' field in the previous record. So, if you create a relationship between the 'previous serial' field, and the 'serial' field, it will link all records to their immediately preceding record so that you can extract the data from it.

To create a this type of relationship, go to the Relationships section of the Define Database window, and drag from the 'previous serial' field out of the table and then back into the table to the 'serial' field. Filemaker will automatically create a second TO (table occurrence) for you (and will come up with a default name which you can edit). Then, it's just a matter of setting the autoenter formula for your date field. The formula to add a week to the previous date would be something like:

Date = MyTable_2::Date + 7

Where MyTable_2 is the name of the second table occurrence.

  • Author

thanks--this is great!

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.