Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I am trying to paste a calculated result into a a date field

The calculation is the following

1/next month/current year..endday/next month/current year

in other words I need to find all records from the following month

I hope that makes sense.

thanks

Posted

Try like this:

Insert Calc Result[Date_Field,

DateToText(Date(Month(today),1,Year(Today))&".."&

DateToText(Date(Month(today)+1,1,Year(Today))-1)

Posted

I prefer using Enter Find Mode [ ] and Set Field [ ] here. You don't have to have the field on layout as Insert Calculated Result [ ] requires and vs. 7 now allows calcs on date fields in finds. Today isn't in vs. 7:

Date(Month(Get(CurrentDate)) + 1; 1; Year(Get(CurrentDate)))

& "..." &

Date(Month(Get(CurrentDate)) + 2; 0; Year(Get(CurrentDate)))

Or even ...

Let(

d = Get(CurrentDate);

Date(Month(d) + 1; 1; Year(d))

& "..." &

Date(Month(d) + 2; 0; Year(d))

)

I'm unsure if Let() helps here but it's sure easier to work with. wink.gif

LaRetta

Posted

Ok, I've got Laretta's first calculation working fine in FM7.

But I couldn't get aaa's calc working in FM5.

this is what I have entered in the Insert calculated result box as a script step (which I am happy to use insert calc result in a script as I do have the field on the layout)

DateToText(Date(Month(today),1,Year(Today))&".."& DateToText(Date(Month(today)+1,1,Year(Today))-1)

Posted

It's Ok , I've worked out what I did wrong.

I am now trying to go one stage further and instead of having a button to trigger the script, I would like to have a pop-up menu that lists not only the name of next month but all of the following months.depending on which month was clicked, it would alter the script to account for the month chosen.

How easy would it be to create a value list based on a calculated result (i.e. always show the following months and not a static list.

thanks again

Posted

You must have one global field Month_Global where will you put your choosing month then in expression instead Month(today) you must put Month_Global.

Other way is to create 12 buttons and 12 scripts. For user this way is more appreciate.

Posted

the problem I see with the buttons is that if the current month is June and someone clicks the January button it would show records from the previous January and not the forthcoming one.With your first suggestion , should I create a value list with all 12 months? I'm a little unclear of this.

thanks

Posted

Yes! You right. You must create value list. Today i finishrd my work. Tomorrow, if you can not solve your problem, i will attach you example.

You must choose Month_Global from Value List then find by:

DateToText(Date(Month_Global,1,Year(Today))&".."& DateToText(Date(Month_Global+1,1,Year(Today))-1)

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