1 Reply Latest reply on Apr 23, 2010 8:20 AM by pguerett

    Using multiple xml files to populate 1 form.

    DubDubDubDesigns Level 2

      Hi All

       

      Thank you for reading this.

       

      My scenario is I have a form which is  inspection report for a product.

       

      Once the technician has finished their inspection they fill in the form and submit it (which saves the form data in xml format to a specific folder on our network.

       

      Now 1 customer may have up to 10 items being inspected on a single order. What I need to do is create a customer report showing them the work required on their items.

       

      Basically I need to be able to import up to 10 inspection report xml files into 1 report form.

       

      I was looking to do this with instances but am struggling.

       

      I can get 1 data file imported using xfa.host.importdata("filename")

       

      but this method appears to reset the form after the first call so the second instance of the form in the report form does not get any data. (if this makes any sense)

       

      How can I set up my report form so I can populate different instances of the subform from different xml files?

       

      i.e. my xml file names are formatted with call number and line number e.g. 42E11134-5.xml  this would be call no. 42E11134 line 5.

      the folder on the network would have 42E11134-1 up to possibly 42E11134-10 (no higher because we cap the maximum items on a single order)

      I need 42E11134-1 data on to appear on subform instance 1, 42E11134-5 to appear on subform instance 5 etc etc, and also recognition of the number of instances required (although this could be selected by the user).

       

      If instances wont work I am happy to have 10 seperate subforms with different names but the must exist within a single form.