Jump to content

This topic is 8319 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

This topic is 8319 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.