Expand my Community achievements bar.

SOLVED

Questions on customizing data collection...

Avatar

Former Community Member

I am currently working on a form that is submitted as an xml file using a submit email button.  There are several things that I am wondering if you can customize and if so, how?

  1. Is it possible to have the calculated date/time field included in the exported data?
  2. IF SO...Is there any way to change the calculated date/time field to calculate when the email button is clicked rather than when the form is started?
  3. Is there any way to have the emailed file named something other than *form name*_data?  Perhaps something that includes the date or other specified field to point more specifically to which form it is?
  4. Finally, is there a way when importing data to import the xml data to an Excel file that already has other collected data in it?

Answers to any of the above would be greatly appreciated! 

Thanks!

Kayla

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Kayla,

Yes, most of that is possible.

1: Select the date/time field and go to the Object > Binding tab. Depending on the version of LC Designer you have, you want the Data Binding dropdown to have 'Normal' or 'Use name'. This means that the value will be exported in the XML file. If the dropdown says 'No data binding' or 'None', then the value will not be exported.

2: The date/time field probably has the script in the initialise or docReady event. That is fine, the date/time will populate when the form is opened. In order to refresh the date/time at the time the user is submitting the form, you would include the following line in the submit button's mouseDown event.

DateTimeField1.execEvent("initialize");

This will fire the date/time field's initialise event and refresh the date/time just before the form is submitted.

3: This is tricker, the XML filename is automatically set to reflect the form filename. You can write script to change the form filename (and by extension the XML filename), however this requires a trusted function in a separate javascript file. This JS file would have to be on every computer that would be used to access the form and to be honest is not worth the (significant) trouble.

4: Adobe do a good job of this, if you distribute your form through Acrobat.com. In addition Acrobat version 9 allows you to select the individual xml files and export these to an Excel spreadsheet (under the Forms menu). You can also compile returned forms by selecting the responses file and the individual xml files. I don't think you will be able to export new XML responses into an existing spreadsheet. Using Excel you may be able to import the new xml into the existing file. If all else fails, I would export the new xml files to a spreadsheet, open this in Excel and copy the new data. Then open the existing spreadsheet and copy the new data to the end of the table.

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Kayla,

Yes, most of that is possible.

1: Select the date/time field and go to the Object > Binding tab. Depending on the version of LC Designer you have, you want the Data Binding dropdown to have 'Normal' or 'Use name'. This means that the value will be exported in the XML file. If the dropdown says 'No data binding' or 'None', then the value will not be exported.

2: The date/time field probably has the script in the initialise or docReady event. That is fine, the date/time will populate when the form is opened. In order to refresh the date/time at the time the user is submitting the form, you would include the following line in the submit button's mouseDown event.

DateTimeField1.execEvent("initialize");

This will fire the date/time field's initialise event and refresh the date/time just before the form is submitted.

3: This is tricker, the XML filename is automatically set to reflect the form filename. You can write script to change the form filename (and by extension the XML filename), however this requires a trusted function in a separate javascript file. This JS file would have to be on every computer that would be used to access the form and to be honest is not worth the (significant) trouble.

4: Adobe do a good job of this, if you distribute your form through Acrobat.com. In addition Acrobat version 9 allows you to select the individual xml files and export these to an Excel spreadsheet (under the Forms menu). You can also compile returned forms by selecting the responses file and the individual xml files. I don't think you will be able to export new XML responses into an existing spreadsheet. Using Excel you may be able to import the new xml into the existing file. If all else fails, I would export the new xml files to a spreadsheet, open this in Excel and copy the new data. Then open the existing spreadsheet and copy the new data to the end of the table.

Hope that helps,

Niall

Avatar

Former Community Member

Thanks so much for all your help Niall!  I got all the date/time features to work how I was hoping now.  As far as 3 and 4 go, that's probably fine.  It doesn't create much more work than we would normally have for some of our other common processes using the Banner system that we use daily.