Expand my Community achievements bar.

SOLVED

List years between two dates

Avatar

Level 1

Hi,

I'm new to Livecycle Designer and am learning as I go.

I have a couple of questions related to the same issue.

1. Is it possible to create a list of years between two dates, in particular financial years? (I'm in Australia so this is 1 July to 30 June).

eg

User enters two dates into date fields:

(Project Start Date Field) 1 July 2012 and (Project End Date Field) 30 June 2015

Have a list auto populate as below:

(List)

2013

2014

2015

or ideally

(List)

2012/13

2013/14

2014/15

leading on from this (if it is possible).

2. Is it possible to have repeating rows automatically created in a table for each of the financial years populated in the list above?

If either/both of these are possible any assistance anyone could provide would be very much appreciated.

Thanks

Ivan

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi,

Please find a sample that shows what I think you would like to do here - https://workspaces.acrobat.com/?d=F9t-rLq3bapw2d-XY0dRuQ

I have ran a couple of test scenarios and have not included error handling to keep the code as easy to read as possible.

if you open the form and look at the code on the click event of the Update button then that is where all the magic happens.

Hope this helps

Malcolm

View solution in original post

3 Replies

Avatar

Correct answer by
Level 5

Hi,

Please find a sample that shows what I think you would like to do here - https://workspaces.acrobat.com/?d=F9t-rLq3bapw2d-XY0dRuQ

I have ran a couple of test scenarios and have not included error handling to keep the code as easy to read as possible.

if you open the form and look at the code on the click event of the Update button then that is where all the magic happens.

Hope this helps

Malcolm

Avatar

Level 1

Malcolm,

That's fantastic, thanks so much.

That does exactly what I am after,

Thanks again.

Ivan