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.

Previously Working Script Does Not Work in FMP v7

Featured Replies

Hi Guys, having a problem with a very simple script that will not work in FMP7 whereas it worked fine in FMP6;

If(IsEmpty(Invoice Paid Date);Int(Get(CurrentDate)-Invoice Date);0)

If an invoice has NOT been paid, the above should return a value equal to the amount of days since the invoice was raised. If the invoice has been paid it should return a value of '0'. In FMP6 the script read as If(IsEmpty(Invoice Paid Date);Status(Status(CurrentDate)-Invoice Date);0) and if the invoice date was also blank then the calculation field would remain empty, however, in FMP7 if the Invoice Date field is blank the sript returns a series of numbers such as '731690'.

Can anyone shed any light on why FMP7 messes this up and what I can do to correct the problem? Cheers.

FileMaker Version: 7

Platform: Mac OS X Panther

Try:

If(IsEmpty(Invoice Paid Date); If (not IsEmpty(Invoice Date); Get(CurrentDate)-Invoice Date); 0 )

Nested Status functions are not supported in FM7, and I don't think Int() is the what you want instead.

  • Author

Excellent, worked perfectly. Thanks v much!

PS: What is the difference (or reason for using)

IsEmpty(Invoice Paid Date)

instead of

[FieldName]=""

I tend to use the latter in calculations especially If statements but wondered if I should be using the IsEmpty syntax?

Cheers

Nelly->

FieldName = "" will only work reliably for text fields. A good programming practice is to always use IsEmpty(), it's guaranteed to return what you expect. I used to use = "" and wondered why certain calcs blew up...

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.