Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

List all Sundays as a list

Featured Replies

  • Newbies

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

For what purpose?

  • Author
  • Newbies

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.

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.

  • Author
  • Newbies

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.

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 ]

...

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.

  • Author
  • Newbies

Thanks Comment!

That worked nicely.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.