Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Javascript for Export XML Button & Import XML Button

Avatar

Former Community Member

Hi:

I'm a Javascript Newb and I think I bit off more than I can chew... I'm trying to create a series of forms (15 forms) and I would like a Data Export and Import button so that the schema form information could easily be exported and imported into eachother. I was wondering what the required code would be to program a form data export button, and a form data import button.

Once an employee submits the form, the submit button will turn into an "Export Form Data" button where management can click it and it will export the form data in XML to a local folder (Download Folder?). The Manager can then choose the next appropriate form, open the blank form, click that form's "Import Form Data" Button where it will import the "form_data.XML" file from the Download Folder and continue to fill in the rest of the information. Now the loop is complete between forms.

This is one of the last things I'm trying to finish on this mammoth project, any helps is greately appreciated!

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi,

I believe that exportXFAData is not supported in Designer. I think you will need to use:

xfa.host.exportData

http://help.adobe.com/en_US/livecycle/9.0/designerHelp/001341.html

Stephen

View solution in original post

3 Replies

Avatar

Former Community Member

Looks like it'll be along the lines of the doc.exportXFAData() comand. Anyone know of any tutorial on how to use this one?

Avatar

Correct answer by
Level 7

Hi,

I believe that exportXFAData is not supported in Designer. I think you will need to use:

xfa.host.exportData

http://help.adobe.com/en_US/livecycle/9.0/designerHelp/001341.html

Stephen

Avatar

Former Community Member

Thank you for pointing me in the right direction... A little elbow grease, coffee, patience, and did I mention patience and the following works flawlessly

//Set to Mouse Up of Export Button:

xfa.host.exportData("",0)

//Set to Import Form button of other Forms:

xfa.host.importData()

//Set to Import Form Form:Ready to check the section "Check Boxes" to see if that section is suppose to be  visible and makes it visible:

if(Button_DelDep.rawValue == 1)

          {

          Del_Dep.presence = "visible";

          }

if(Button_DelArr.rawValue == 1)

          {

          Del_Arr.presence = "visible";

          }

if(Button_Div.rawValue == 1)

          {

          Div.presence = "visible";

          }

if(Button_MADiv.rawValue == 1)

          {

          MADiv.presence = "visible";

          }

if(Button_DelDepXD.rawValue == 1)

          {

          Del_DepXD.presence = "visible";

          }

if(Button_Other.rawValue == 1)

          {

          Other.presence = "visible";

          }