2 Replies Latest reply on May 6, 2009 12:10 PM by Kevin Cavallo

    Drop down menu with auto-populating dates?

    sharon.murphy

      Hello everyone. I'm working on getting our department paperless, and part of that process requires we convert time sheets to PDF. I've been tasked with doing this, and I've been working with LiveCycle for 3 weeks. Everything has been going well, however I it my first snag this morning.

       

      I'm trying to create a dropdown with "pay period ending" dates. It must list dates for every other Friday (9-May-2009 for instance), but I have two issues:

       

      • Values are showing up elsewhere as single digits, and
      • I am stumped as to how I can make it automatically list every two weeks without having to hand code the dropdown.

       

      Ideally, here's what I need:

       

      1. The dropdown would have these values:
        9-May-2009
        23-May-2009
        06-Jun-2009
        20-Jun-2009
        and so on and so forth....
      2. The dropdown would lock once a user signs the form.
      3. The chosen date would copy in another field as a date, not as an integer.
      4. The dropdown would ONLY show new dates and one old (passed) date. For instance, by the time 06-Jun-2009 passed, 09-May-2009 selection would drop off).

       

      Can anyone help with this? Thanks so much in advance

        • 1. Re: Drop down menu with auto-populating dates?
          pguerett Level 6

          I am no programmer so I have been struggling with this....but would this be acceptable. What if the pay periods were hard coded ods into an array in the form (26 per year - if more are required then that is not an issue) . Then based on the current day find the location of the closest pay period, then take the next ten pay periods and populate the dropdown?

           

          Make sense?

           

          Paul

          • 2. Re: Drop down menu with auto-populating dates?
            Kevin Cavallo Level 4

            Sharon, if you don't like the hard-coding idea, I think that this can be done pretty easily with scripting.  I'm not sure I understand your example.  The dates in your example are Saturdays; are you looking for the day after the Friday pay period?


            Also, do your two-week windows reset every year to start on the second Friday of Jan, or do they roll across years?  That will affect how you 'seed' the start date.