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.

Featured Replies

I use the following calc field for age:

NumToText(Year(Today) - Year(dob)- Case(Today< Date(Month(dob), Day(dob), Year(Today)), 1, 0)) & "/ " &

NumToText(Mod(Month(Today) - Month(dob) + 12 - Case(Day(Today) < Day(dob), 1, 0), 12))

It works beautifully except for one thing, until the user enters dob, the calc field shows a nonsense year that is distracting. I understand the concept of

"not IsEmpty" but since I didn't write the calculation I'm using, I hesitate to play around with it for fear of ending up with a mess that no longer calculates rather than the ideal situation where the age field waits for all relevant data before displaying.

Can anyone help?

Yeah... first thing to do is backup the database with the Save a Copy As command. Now you don't have to worry about buggering anything up!

Second thing, I also "backup" a complicated calculation field (using the duplicate button in the Define Fields dialog box) and work on this one. When I have it working I copy the new calculation and paste it into the original field. Then delete the duplicate field. (If I bugger it I just delete the field and try again by dup-ing the original once more.)

I try to avoid the Today function and use Status[CurrentDate] and Status[CurrentTime] instead. These functions are better because they can be re-evaluated at any time: Today is only evaluated when the database first opens, which is a bummer if you leave the program running for a cople of days -- it will be wrong.

To solve the "nonsense year" appearing before a dob is entered, just nest the whole calculation in a case[] function...

Case[isEmpty[dob], "",

NumToText(Year(Today) - Year(dob) - Case(Today< Date(Month(dob), Day(dob), Year(Today)), 1, 0)) & "/ " &

NumToText(Mod(Month(Today) - Month(dob) + 12 - Case(Day(Today) < Day(dob), 1, 0), 12))

]

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.