August 18, 200916 yr 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
August 18, 200916 yr 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.
August 18, 200916 yr 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.
August 18, 200916 yr 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.
August 18, 200916 yr 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 ] ...
August 18, 200916 yr 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.
Create an account or sign in to comment