November 14, 200619 yr I need to populate 2 global fields (Temp::TDG and Temp::TDG2) so my portal will automagically display the current months records. I have a portal that displays the records that have been created and you can filter them by entering the To: & From: dates and it will display. But I want to have it automatically enter the current month into the fields so it will display without the user having to enter anything unless they want to look at a different month. I can't seem to figure out the calc to make it happen because I want it to be dynamic so that if it see's 11/14/06 I want it to display To: 11/1/06 and From: 11/30/06. Can anyone show me what the calc might look like. I can't seem to figure it out. Nate
November 14, 200619 yr First day of the month is easy: Date ( Month ( date ) ; 1 ; Year ( date ) ) Last day of the month is: Date ( Month ( date ) + 1 ; 0 ; Year ( date ) ) That looks weird, I know; but FileMaker will interpret a day of zero to the last day of the previous month, and it also handles the month in a similar way when the month is > 12.
November 14, 200619 yr Author AWESOME! That worked like a CHAMP!!! Here is what the final script looks like for future reference. Set Field[Temp::tdg; Date ( Month ( Get ( CurrentDate ) ) ; 1 ; Year ( Get ( CurrentDate ) ) )] Set Field[Temp::tdg2; Date ( Month ( Get ( CurrentDate ) ) + 1 ; 0 ; Year ( Get ( CurrentDate ) ) )] Thanks for the help!! That is great!
Create an account or sign in to comment