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 5635 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

How can I get a list of all Sundays for the current year in this format?

1/4/2009

1/11/2009

1/18/2009

and so on for the entire year...

TIA

  • Newbies
Posted

To populate a value list so that a user can select the correct corresponding Sunday from a list of dates as demonstrated in my first post.

Posted

I am not sure how do you want to handle that, since a calculation based on the current date cannot be stored - and if it's not stored, it cannot be used for a value list.

  • Newbies
Posted

There is a scripted process that drives a user to the layout where the value list is used. I could use SetField to push the result to an indexed field and create a value list from that.

Posted

Why not let the script compile the list, then? Something like:

...

Set Variable [ $y ; Year ( Get ( CurrentDate ) ) ]

Set Variable [ $sun ; Let ( ny = Date ( 1 ; 1 ; $y ) ; nY - Mod ( nY ; -7 ) ) ]

Loop

Exit Loop If [ Year ( $sun ) > $y ]

Set Variable [ $sundays ; $sundays & $sun & ¶ ]

Set Variable [ $sun ; $sun + 7 ]

End Loop

#

Set Field [ Yourfield ; $sundays ]

...

Posted

Poor man's popup.

This can also be done with one calculation field and one script. The calc field generates the next 52 Sunday dates from the current date forward, each separated by a return. The script takes the value in that field where the cursor resides and places that value in another field.

I have a publication that runs on Thursdays. To set date for an ad or subscription you click on the date field, a button. If date field is empty, a list of dates appears, click on your choice, click date field again, the date is set. If date field is not empty, it is selected for editing.

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