carol333 Posted August 3, 2007 Posted August 3, 2007 hello again after a long absence trying to hone my Filemaker skills now that my company has F8 - but I guess I'm still a newbie so excuse if I ask a question that has been answered before (although I've just spent a half hour skimming through topics hoping to find a 'simple' answer that might help my problem - but no luck ) so can I ask if anyone knows how to help with the following: I have a database with 2 fields I need to bring up in a report - I need to run the report every quarter which looks for the date1 field completed but date2 field blank -I think I can work this bit out myself as follows If(GetAsNumber(date1) ≠ "" ; If(GetAsNumber(date2)="" ; "alert message ")) but where I get stuck is how do I get the report to run so that each time it only searches on records with date1 completed in the previous quarter?? many thanks for any tips you can give me Carol
stanley Posted August 3, 2007 Posted August 3, 2007 Carol: It sounds to me like you could do a find (or add a request to your find) with the wildcards for 'empty' and 'not empty', which are = and *, respectively. Otherwise, you should look into using the IsEmpty() function (which you can precede with 'not' to show what has data in it.) -Stanley
mr_vodka Posted August 3, 2007 Posted August 3, 2007 Firs you will have to figure out what the last quarter date would be. So if the date is today 8/3/2007. Then the serach criteria would have to be > = 3/1/2006 and < 7/1/2007 for the start date and = for the end date being empty.
Søren Dyhr Posted August 3, 2007 Posted August 3, 2007 Not nessersarily the the way I would do it, take a look above - It's what i would initiate my reporting script. In line 3 is it where I gather dates from previous quater by using this calc' GetAsText( Year ( Get ( CurrentDate ) ) - Case ( not Div ( Month ( Get ( CurrentDate ) ) ; 4 );1;0 ) & "+" & Choose ( Div ( Month ( Get ( CurrentDate ) ) ; 4 ) ; "{10...12}"; "{1...3}"; "{4...6}" ; "{7...9}" ) & "+*") The way it works is if you are in jan, feb or mar should the search both subtract the year by 1 and choose the month span of {10...12} .... Otherwise make a search in the previous span. Actually should: Div ( Month ( Get ( CurrentDate ) ...be declared as a variable instead of being repeated, which gives a faster code ...although the difference is very tiny here! --sd
comment Posted August 3, 2007 Posted August 3, 2007 How about: Let ( [ today = Get(CurrentDate) ; q = 3 * Div ( Month ( today ) - 1 ; 3 ) ] ; Date ( q - 2 ; 1 ; Year ( today ) ) & ".." & Date ( q + 1 ; 0 ; Year ( today ) ) )
carol333 Posted August 6, 2007 Author Posted August 6, 2007 many many thanks to you all - I'm busily working through these but it's getting a bit complex for me - it may take a bit of time...........
Recommended Posts
This topic is 6319 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 accountSign in
Already have an account? Sign in here.
Sign In Now