8 Replies Latest reply on Oct 6, 2017 8:31 AM by Ayreonautic

    Save PDF to File Path based on Form Field selection

    Ayreonautic

      Hello!

       

      I am trying to create a form that saves to a specific path depending on the option you select for a drop-down field. So, for instance, you have a drop down field and you select 1,2,3,4 and each selection will change where the file is saved. Is this possible?

       

      I've successfully made a document that saves to one location using folder-level scripts but I am not sure how to add an if-else statement so the file location is appended depending on what value is entered in a specific field.

       

       

      // determine the directory path for the current document

      var directory = "/shared$/Manuals & Documentation/MCR/"

      if (typeof(mySaveAs) == "function") {

        mySaveAs(this, directory, "MCR-" + this.getField("mcr #").value + " (" + this.getField("model #").value + ")" + ".pdf");

        app.alert("Document archived successfully");

      } else {

        app.alert("Save script missing or installed incorrectly. Please save-as manually or contact STR");

      }

       

      Thank you so much for all the help!!!!