14 Replies Latest reply on Nov 6, 2017 5:38 PM by ddunn@davidsdunn.com

    How to pass an fdf file name from from doc a to doc b and import the fdf to doc b

    ddunn@davidsdunn.com Level 1

      An fdf file has been exported from document A and saved. It’s location and name are constructed from two variables, path + myFilename + ".fdf".


      I know that the file name and device independent path are correct.


      I placed a hidden field in doc B to receive the value of path + myFilename + ".fdf".


      Objective: after doc B opens I want doc B to import my saved fdf file.


      I am assuming that I need to pass the value of path + myFilename + ".fdf" to a field in doc B, and then tell doc B to import that fdf file.


      Here is the most recent of many unsuccessful attempts to achieve my objective.


      //fields in doc A

      var myFilename = this.getField("txt.ClientFileName").valueAsString;

      var path = this.getField("txt.Path.Client").valueAsString;

      var parentPath = this.getField("txtL.Path.Parent").valueAsString;

      var forms = this.getField("txtL.Folder.Forms").valueAsString;


      var docB = app.openDoc("" + parentPath + forms + "PowerOfAttorney_Seller.pdf");

      var docBSource = docB.getField("txt.dataFile");    

      docBSource.value = path + myFilename + ".fdf";   



      Result: Doc B opens, but the value of path + myFilename + ".fdf" is not passed to docBSource  and the import fails.  Can someone please tell me where I'm going wrong?