October 23, 200223 yr Newbies [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
October 23, 200223 yr 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
October 24, 200223 yr 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.
October 24, 200223 yr There is actually only one problem date with CS's formula. It's when the last donation is on Feb. 1st on a leap year.
October 24, 200223 yr 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.
October 24, 200223 yr 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)
Create an account or sign in to comment