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.

Portal Difference between records

Featured Replies

I have a single portal on my layout where one of the fields is a number field. For each line of the portal I need to show the difference between the numeric value for that record and the previous record.

For example

Rec Num_Value Diff

1 3

2 5 2 (i.e 5-3)

3 9 4 (i.e 9-5)

4 14 5 (i.e 14-9)

5 21 7 (21-14)

etc.

The difference field will show the difference between that record and the value in the previous record.

I guess it must be via a calculation field but I really dont have any clue how to start

Any help please

Thanks

With tools availiable can't I see other ways than by script turning the numbers into a pilcrow delimited list in every record where you then use this custom function:

http://www.briandunning.com/filemaker-custom-functions/detail.php?fn_id=39

...with the parameter (the list) you recieved from the previous record. should you loop yourself thru all records while setting a new field xor-ing its list with the previous list.

--sd

You need a relationship to the previous record. If your records have consecutive and contiguous serial numbers, you can define a calculation field PrevID =

SerialID - 1

Then define a relationship:

table::PrevID = table 2::SerialID

The difference =

Value - table 2::Value

If you cannot guarantee that serial numbers are contiguous (e.g. records may be deleted), make the relationship:

table::SerialID > table 2::SerialID

and sorted on table 2 side by SerialID, descending.

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.