Jump to content

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

Recommended Posts

  • Newbies
Posted

[apologies for my ignorance, but hours of my own reading/research have proved fruitless]

[1] i've got about 7 separate "single check box" fields. what i would like: any time ANY of these boxes are checked, an 8th (and separate) "single check box" field would AUTOMATICALLY be checked. i've tried to tackle this using "auto-enter" but no success. does this require a script, and if so, how would it look?

[2] there are two date fields. one for "last donation" and another for "membership expiration date". i would like the latter to AUTOMATICALLY = one year AFTER the "last donation" date AND specifically, on the FINAL DAY of that month (if possible). example: "last donation" is 10/13/02 - i would want the "expiration" to be 10/31/03. does THIS one require a script or is it possible to handle through "auto-enter". i've gotten so far as getting the "expiration" field to equal the "last donation" field, but can't successfully add any number of days/months/years to this amount.

i would GREATLY appreciate any advice. thanks a lot.

neep

Posted

For your first problem, I suggest that you make your 8th checkbox a calculating field with a formula along the lines of:

Case(not (IsEmpty(Checkbox1) and IsEmpty(Checkbox2) and IsEmpty(Checkbox3) and IsEmpty(Checkbox4) and IsEmpty(Checkbox5) and IsEmpty(Checkbox6) and IsEmpty(Checkbox7)), 1)

That way, the eighth checkbox will always have a tick when any of the other seven do.

As regards your second question, you can set the second field however you wish, by script using a Set Field [ ] command, by Auto-Enter (Calculation) option, or simply by setting the field up as a calculation field.

In either case, you will require that the field be a Date field (and that the LastDonation field also be a date field), and the formula you'll need will be along the lines of:

Date(Month(LastDonation + 365) + 1, 1, Year(LastDonation + 365)) - 1

Posted

Date(Month(LastDonation + 365) + 1, 1, Year(LastDonation + 365)) - 1

I think that will return the wrong result for the first day of the month when the following year contains February 29th. I might recommend:

Date(Month(LastDonation)+1, 1, Year(LastDonation)+1) - 1

Same idea, though.

Posted

Come to think of it, there would be problems with several last donation dates that take place on the first of the month when a leap year is involved.

Posted

This works too... It lets Filemaker sort out the leap years etc. Nothing like having a birthday on 29 Feb to focus the mind on leap year date problems.

Date(Month(LastDonation)+1, 0, Year(LastDonation)+1)

This topic is 8137 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.