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.

Successive records

Featured Replies

I have a table with invoices and a field with the outstanding balance for each invoice.

I need a field (calculation) a sort of 'customerflag', when the balance on 3 successive invoices of a given customer exceeds a given amount.

I found a way to have it with a script (search/found set/loop/flag), but I wonder if there is a way without user interaction (no button click to activate script)

TIA

Assuming you have the following fields:

CustomerID - A unique field identifying the customer

InvoiceNumber - A unique field identifying the invoice in sequential order (ie, a serial number of some sort)

InvoiceAmount - The total amount of the invoice

Create a selfjoin relationship called "AdjacentInvoices" with the following two parameters:

CustomerID = CustomerID

InvoiceNumber <= InvoiceNumber

Have the relationship sort by InvoiceNumber (descending).

Then you can create a new CustomerFlag calculated field with this formula:

Let([

n=Count(AdjacentInvoices::CustomerID);

Amount2=GetNthRecord ( AdjacentInvoices::InvoiceAmount ; 2 );

Amount3=GetNthRecord ( AdjacentInvoices::InvoiceAmount ; 3 );

TotalAmount=Case(n<3;0;InvoiceAmount+Amount2+Amount3)

];

Case(TotalAmount>500;"Warning";"")

)

  • Author

Perfect.

Thank you.

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.