Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to format a date field with fixed date but variable (current) year?

Avatar

Level 1

I'm trying to create a simple form in LiveCycle Designer ES for gathering some tax information from officers and employees of my union. One of the fields to be displayed is the "Union's Fiscal End Date". This is a display-only informational field, NOT something a user should need to interact with. The display for the form this year would be December 31, 2015. December 31 is consistent from year to year. Only the year itself would need to change if the form was reused in subsequent years. I don't want to have to edit the form to manually change the form every year. Is that unreasonable? I hope not.

What do I need to enter - and where exactly within LiveCycle Designer ES - to display a single day - December 31 - along with a variable year?

I thank you in advance for any help.

Carl Baldasso

6 Replies

Avatar

Level 7

Create a display pattern for your text field like so.

716938_pastedImage_0.png

Now onlu the four digit year is variable.

Avatar

Level 1

Thanks. That seems like it should have worked, but it didn't. I created the Text Field and added this as a Display pattern: text{'December 31, '9999} - see below - and Applied that.

livecycle-text-display-1.jpg

But nothing shows up in the Text Field box, neither in LC Designer (see below) nor in a Preview of the PDF.

livecycle-text-display-2.jpg

Am I doing something wrong?

Avatar

Level 7

Nothing will appear until the the display mask is satisfied (i.e. enter a four digit year)

Avatar

Level 1

But having the user type amy thing into this box defeats the purpose. The purpose is to be a descriptive date that shows the end of the fiscal year. It should display that date without the user having to enter anything. Is that not posdible? I'm beginning to think that this will have to become a manually edited text box, with the correct year typed into a static text box, not be something that displays a fixed date plus a varying year. Seems like such a simple request, but proving to not be such.

Avatar

Level 7

Well yes, you can have the field be set to whatever year it is on the computer's clock, but then your old forms (from previous years) will show the wrong year.

Avatar

Level 1

Old forms are not an issue. Last year's forms would have been opened by the Financial Secretary and printed and submitted to the IRS or accountant or whoever is the ultimate recipient of this information in that year. There would be no reason for someone to go back one or more years and open or print old, incorrectly-dated forms. So that doesn't bother me. But I still need to know how to create the field that automatically displays the date December 31 with the current year, in a box that the user sees when the file is opened, without having to type anything into the box. That continues to be the question: what kind of field is this and what code do I type in to get such a display?

Actually, as I  think about it more, I  really need the year displayed to say LAST YEAR, because, for example, in early 2015 I am filling out the form that contains my information for fiscal year ending December 31, 2014... last year. So I need the proper code to display "CURRENT YEAR MINUS 1" in effect. Does that make sense? Is that possible? Maybe I need 2 separate fields: one text box with the unchanging date of "December 31," followed by the auto-displayed variable year of "Current Year -1". What will display the 4-digit year prior to the current year?