Format XML Export/Save-As
Hello all,
I hope to make my question as concise as possible without making my post too lengthy. Please let me know if anything is unclear.
My goal from a 1000 foot view: Create a PDF checklist that managers will fill out for new hires. On this checklist they will select a check box for each system that they would like their new employee to have access to. The checklist will then be submitted to the Help Desk via email for account creation. A Help Desk technician will look over the form to ensure that all requested systems are actually appropriate for the new employee (e.g. a manager in the call center should not be checking the boxes to grant access to the various IT administration systems for their new hire, and it will be the Help Desk Technician's job to catch such a scenario). The Help Desk technician then launches a PowerShell script that will interact with the form, automating the setup of the various requested systems.
How submission occurs: In my form there is a Submit button that relies on a Javascript using "this.submitform" to submit the form via email. When submitting via XML the result is beautiful when it comes to automation with PowerShell. I have a check box for each system that access is requested to, and each check box is identified by name and flagged as "Yes" if it was checked, and "Off" if it was not. Here's an example of the XML output:
<AddAD>Yes</AddAD>
<AddAccurint>Off</AddAccurint>
<AddAdaxes>Yes</AddAdaxes>
<AddArtiva>Yes</AddArtiva>
<AddAzure>Off</AddAzure>
<AddBarracuda>Off</AddBarracuda>
The initial problem: The downside to submitting the form directly as an XML is that it's rather difficult for a Help Desk Technician to review the XML code to ensure that the form was filled out properly. Changing the form to be submitted as a PDF attachment allows the Help Desk Technician to review the form, but does not allow the information in the form to be easily passed to a PowerShell script.
My proposed solution to the initial problem: Since we cannot have the user directly submit the form as an XML, then we will have them submit the form as a PDF attachment. Once the technician looks over the submitted form to ensure that everything is in order he or she will then either manually save as XML, or click a button on the form that performs this action for them (the details here I haven't worked out yet, more on that next).
The problem with the proposed solution: When saving either as XML or Exporting to XML the result is an unreadable mess and does not seem to identify which check boxes have been selected on the form. I'm trying to understand why the XML is formatted differently when using "this.submitform" than any of the save commands. I have a feeling that perhaps I am only seeing the metadata in this scenario.
Does anybody know how I can format XML via a Save-As or Export in the same fashion that "this.submitform" formats it? I am more than happy to use Javascript to accomplish this if necessary.
