Expand my Community achievements bar.

Current date disappears in spreadsheet

Avatar

Level 4

I've created a form submitted by an email button, and the form has either a current date object or a date/time field. I'm trying both but neither one works. When the email arrives, I open the PDF attachment and can see the date or date and time, but when I "Merge files into a spreadsheet," there is no column for this object. I can see FormCalc in the script window

$.rawValue = Concat (Num2Date(Date(), "YYYY-MM-DD"), " ", Num2Time(Time(), "HH:MM:SS")).
Does anyone know the reason for this behavior? And better yet, is there a way to make these objects return a value to the spreadsheet?

10 Replies

Avatar

Level 10

Hi Sean,

I susect that if in LC Designer you select the date object and go to the Object > Binding palette, that the binding is set to None. If so, change this to Name/Normal.

Hope that helps,

Niall

Avatar

Level 2

Hi, Niall!

Thank you for this suggestion. In ES2, in the Object palette, there are tabs for Fieldand Value. In the Value tab, I selected Runtime Property: Current Date/Time. On the Field tab>Patterns, I selected a Type, but nowhere do I see a Binding palette or Name/Normal. Have you tried one of these objects to see what happens? It's strange to me that the PDF shows the Date and Time, but when I send the data to a spreadsheet, only the Date Time disappears. Even the name of the object is missing, while all the other objects are accounted for and show values. I searched the forums for "current date problem" and variations and didn't see anything quite like this. Perhaps I missed something, and I'll do some more searching today, but the problem seems so evident that I'm surprised I can't find a ready solution. Just to try out that object, I created a test form with just a Date/Time Field or Current Time, and when I created the spreadsheet, there was no data at all. No column heading and no data.

Wait a second! I just looked at a form I created two years ago. It has a Date/Time field, and the Object palette is different! It has the Binding tab you mentioned, and the Patterns dialogue is completely different, with many more options. It has more tabs, too: Display, Edit, Validation, and Data, whereas on my object I'm currently working with, there are only two tabs: Display and Data. I'm using ES 2 version 9.0.0.2.20101008.1.734229.

What do you think? What am I missing?

Avatar

Level 10

Hi,

It is difficult to say what you are missing. Maybe the object has become corrupted.

The palette will change to suit the object type selected. However the "Current Date" object is just a date/time field object with default script.

The Object > Binding palette should look like this:

Parallels Desktop1.png

By default the Current Date object has its binding set to None.

Niall

Avatar

Level 2

I should also add that right now I'm using my own machine. Ok. Now I have some more helpful information. I created this problem form at work. The Date/Time field and Current Date field from that form are the ones with more limited palettes. Now, at home, when I drag a Date/Time field or Current Date field onto the same form, I get the full object palette that I see on that form from two years ago. So, it seems that ES 2 at work is different from the ES 2 that I have at home. I guess I should compare versions or maybe get LiveCycle reinstalled.

Something else I noticed. When I open a test form in Acrobat and click Highlight Existing Fields, the Date/Time field is highlighted, but not the Current Date field. And when I Export data to an XML file, only the Date/Time field appears.

Do you have any other thoughts or suggestions? Do I have to add some scripting myself to the Current Date field?

Avatar

Level 10

Hi,

The reason the Current Date is not exporting is that by default its binding (Object > Binding palette) is set to None/No Data Binding. If you want it to export you will need to change this to Use Name/Normal (as per the screenshot above).

The reason that the Current Date object is not highlighted in Acrobat, is because in LC Designer its Access is set to Read Only (see the Object > Value palette).

If on the work machine palettes are not visible, you can turn them on via the Windows menu in LC Designer.

Parallels Desktop1.png

Hope that helps,

Niall

Avatar

Level 2

I notice that if I select as Value Runtime Property, then the Binding tab disappears. And there's a FormCalc in the script editor. with Num2Date and Num2Time functions. However, when I Manage Data, there are no fields and no values either from Export as XML or in a spreadsheet. Also, I notice that when I open my form from two years ago, Acrobat has the line across the top that says, "Please fill out the following form" and has the Highlight Existing Fields button, which does highlight the Date/Time field. If I Export this form to an XML file, I get a value for the Date/Time, but if I send the same form to a spreadsheet, there are no columns of data at all!

I'm Dazed and Confused!

Avatar

Level 10

Hi,

I would not change it to a runtime property, particularly if you want it to export with the rest of the data. Leave it as a calculation property in the Object > Value palette.

Niall

Avatar

Level 2

I've tried it both ways, and in neither case does the date make it into a spreadsheet, although it does make it into an XML file. What accounts for this behavior, do you suppose?

Avatar

Level 10

Hi Dazed and Confused,

I don't know. I don't delve into the MS world of Excel often. I used to; but I've recovered. If the Current Date has made it to the XML sphere, that should be sufficient. Why it has not made the leap to a mere spreadsheet is beyond me.

Live long and prosper,

Niall

Avatar

Level 2

After more testing, I've found that the Date/Time field cannot be set to Data Format Date and Time or it won't work. Current Date is the same. I've gotten errors in the Report palette when there is a mismatch. So the Help instructions aren't accurate. These two fields are actually limited to dates, if you want to export the data to a spreadsheet, at least. I don't know why each object has so many possible settings in the Object palette when you can't use certain combinations.

Now I'm looking for a FormCalc that will work with another object, say a text field, that will give me a timestamp, using Num2Date and Num2Time.