3 Replies Latest reply on Jun 11, 2015 11:46 AM by JohnnyBQue

    When using my Dynamic Stamp I get the word "undefined" where the text entered from the dialog box should be

    JohnnyBQue

      I get my dialog box to open no problem I enter data click okay but the stamp shows that the text field are "undefined". The Text field names are "Due" and "WorkOrder" in the pic below they show up "DueValue" and WOrkOrderValue" then the results as shown "undefined" for both. I put the code at the bottom I remove the section that caused the word "value" to show up at the end of Due and Work Order.

       

       

      //<AcroForm>

      //<ACRO_source>CaseNumField:Calculate</ACRO_source>

      //<ACRO_script>

      /*********** belongs to: AcroForm:CaseNumField:Calculate ***********/

      var dialog = {

                     DueValue: "",

               WorkOrderValue: "",

                    

       

       

              commit:function (dialog) { // called when OK pressed

                      var results = dialog.store();

                      this.DueValue = results["tx1"];

                      this.WorkOrderValue = results["tx2"];

             

              },     

       

              description:

              {      

                      name: "Control Stamp Information",    // Dialog box title

                      elements:

                      [      

                              {      

                                      type: "view",

                                      elements:

                                      [      

                                              {      

                                                      name: "Due: ",

                                                      type: "static_text",

                                              },     

                                              {      

                                                      item_id: "tx1",

                                                      type: "edit_text",

                                                      multiline: true,

                                                      width: 200,

                                                      height: 40

                                              }, 

                                              {      

                                                      name: "Work Order #: ",

                                                      type: "static_text",

                                              },     

                                              {      

                                                      item_id: "tx2",

                                                      type: "edit_text",

                                                      multiline: true,

                                                      width: 200,

                                                      height: 40

                                              }, 

                                              {      

                                                      type: "ok_cancel",

                                                      ok_name: "Ok",

                                                      cancel_name: "Cancel"

                                              },     

                                      ]      

                              },     

                      ]      

              }      

      };

       

       

      if(event.source.forReal && (event.source.stampName == "#VOfL_5866j3cq0GIzQbaLC"))

      {

        if ("ok" == app.execDialog(dialog))

        {

          var cMsg = dialog.DueValue;

          event.value = "Due\n" + cMsg;

          event.source.source.info.DueValue = cMsg;

       

          cMsg = "Work Order\n" + dialog.WorkOrderValue;

          this.getField("WorkOrder").value = cMsg;

        }

      }