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.

Calculation to get field from prior row

Featured Replies

I apologize if this has been answered, but I can't find it.

I have a file that uses a record ID and date. I have a self join relationship for matching record IDs and the date sorted as desc.

FileName = Fiber

Relationship = Fiber Shearing (match to Record ID in Fiber, sorted by date desc)

Example:

Fiber Shearing::Date in current record = 7/1/09

Fiber Shearing::Date in prior record = 6/5/08

I need a calc field (Prior_Date) to retrieve 6/5/08 in the current record.

I tried:

GetNthRecord ( FIBER Shearing::Date_Shorn; Get (RecordNumber) + 1 )

but that does not use my sort and retrieves the newer date into the older record.

I know this has got to be simple, but I can't seem to get there.

Thanks.

I assume that "Record ID" is some sort of category field, and not a unique identifier as the name would suggest?

If so, you should make your relationship follow this pattern:

Table::Category = Table 2::Category

AND

Table::Date > = Table 2::Date

Now if you sort the related records by Date, descending, the previous record will become the first related record and you can refer to it directly (assuming no two records in the same category have the same date).

  • Author

That did it... I knew it had to be easy.

Thanks.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.