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.

Storing a calculation in a text field

Featured Replies

I have a database that contains one record per national holidays. As you know, not all holidays have fixed dates (ie Vicroia Day (i'm in Canada) is the monday previous to the 24th of May). I could create a calculation field that will calculate the date of the next occurence but I would have to create one field per holiday OR create one huge calculation field with a Case that handles every holiday. My db will contain every national holiday for every country, so I mean HUGE calculation field. In any case I would have to define or modify my filed formulas everytime I add a holiday which would be annoying since I will be sharing the db with fmp server.

I thought maybe I could store the calculation formula in a text field and have another calculation field return the date. Is there a way to tell fmp to use the content of a text field as a calcualtion formula ?

Thanks.

Search the forums. A few months ago somebody posted the calculation for some holidays (Jewish I think) and posted the link to some official US gumment web site with the algorithms for working this stuff out.

It's not easy, especially as some religious holidays work off the phases of the moon.

As for doing an "every country" calendar with all public holidays: gimmee a copy when it done please.

This is how I got my holidays onto my calendar:

a global field (date) for each holiday (gMLKDay, gEaster, etc)

37 global fields (text), one for each square on the calendar (gHoliday1, gHoliday2, etc.)

one script sets the holidays (gMLKDay, gEaster, etc) for the month and year of the current calendar

one script sets the 37 global text fields (If gCalendarDate1 = gMLKDay, Set Field (gHoliday1) = "M.L. King Day", etc.)

These 2 scripts are included in the set of scripts that run when the user changes the month or year on the calendar.

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.