Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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.

Posted

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!

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