Skip 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.

Calculation to show prior record

Featured Replies

I hope someone can help me on this:

I need to have a field calculation that shows the PRIOR record in a particular field. For example in table 'X' field 'PAYMENTS' has three records showing:

1

2

3

with '1' being the most recent

I need to have this field calculation display '2' since it is the second most current.

Also, I can't modify my relationships because of how integrated the database is now.

Thank you in advance to all who can help me out!!!

You need either a relationship - or version 8.

  • Author

You need either a relationship - or version 8.

Our IT won't allow us to buy filemaker at all anymore so we are stuck with 7.

As far as relationship, ok, how can I do this? Any type of relationship and calculation I'm familiar with will only show the last new record but not the second to last new record.

I appreciate the help

There are several ways to do this. Can you provide more details about your structure and the purpose of this requirement?

  • Author

Absolutley, thank you!

I need to show on a report what an employees prior assignment was (table: EMPLOYMENT HISTORY) in field EMPLOYMENT HISTORY::Assignment.

This report is run after we update the employees assignment. We need to run this report to update their security levels in a seperate mainframe system (we see where they are now compared to where they were).

There are several related tables in this database, however most all layouts use table: PERSONNEL FILE. (for example when we do updates to assignment, it is via a portal showing records in EMPLOYMENT HISTORY. The report, however, is showing records directly from EMPLOYMENT HISTORY.

Well, of course, if you only need this for a report, you could do it by script - no additional relationship required. Roughly, the script would:

Go to Related Record [ EMPLOYMENT HISTORY ; Show only related ]

Sort Records [by Date, descending ]

Go to Record [2]

Set Field [ PERSONNEL FILE::PreviousAssignment ; EMPLOYMENT HISTORY::Assignment ]

...

(I presume there IS a date field you can use for this; if not, use an auto-entered serial number field instead.)

But if you want a "live" calculation, define a relationship between EMPLOYMENT HISTORY and a new occurence of the same table (i.e. a self-join), which I will call PREVASSIGNMENT:

EMPLOYMENT HISTORY::EmployeeID = PREVASSIGNMENT::EmployeeID

AND

EMPLOYMENT HISTORY::Date > PREVASSIGNMENT::Date

(Same note here about the date field.)

Sort the relationship on the PREVASSIGNMENT side by Date, descending.

Go to Layout mode, and place the field PREVASSIGNMENT::Assignment on the layout of PERSONNEL FILE.

  • Author

Wow thank you! This works great!

Now that you explained it, this makes sense :B .

Have a great weekend!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.