3 Replies Latest reply on Jun 18, 2015 7:30 AM by dionbalson

    Check mark not showing up in dynamic stamp after applying to document...is there a common reeason for this?

    JohnnyBQue Level 1

      wasn't going to post the code but I know the first answer would have a comment "I would need to see the code" so I've posted it below....

       

      I just need the check mark to show up in the stamp after stamping the document....the dialog box works great (text boxes that is)....I'm able to place check marks in all the check boxes in the dialog box, but again they don't show after stamping...

       

      I've only included the code for 1 of the check boxes just to get it working the duplic the other 4.

       

       

      var dialog =

                 {

                        DueValue: "",

                  WorkOrderValue: "",

               QuantityValue: "",

              IssueDateValue: "",

                IssueToValue: "",

                cb1Value:false,

                cb2Value:false,

                cb3Value:false,

                cb4Value:false,

                cb5Value:false,

       

              initialize:function(dialog)

                   {

       

      var diginit=

                    {

              "Chk1":this.cb1Value,

              "Chk2":this.cb2Value,

              "Chk3":this.cb3Value,

              "Chk4":this.cb4Value,

              "Chk5":this.cb5Value,

                 

                     };

              dialog.load(diginit);

                    },

             

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

                    

                   {

                      var results = dialog.store();

                      this.DueValue = results["txt1"];

                      this.WorkOrderValue = results["txt2"];

              this.QuantityValue = results["txt3"];

              this.IssueDateValue = results["txt4"];

              this.IssueToValue = results["txt5"];

       

              var oRslt=dialog.store();

              this.cb1Value=oRslt["Chk1"];

              this.cb2Value=oRslt["Chk2"];

              this.cb3Value=oRslt["Chk3"];

              this.cb4Value=oRslt["Chk4"];

              this.cb5Value=oRslt["Chk5"];

       

                   },     

                       description:

                       {

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

                          elements:

                          [      

                             {      

                                type: "view",

                                elements:

                                [      

                                                             {      

                                                             name: "Due: ",

                                                             type: "static_text",

                                                             },

          

                                                             {      

                                                             item_id: "txt1",

                                                             type: "edit_text",

                                                             multiline: true,

                                                             width: 100,

                                                             height: 30

                                                             },

       

                                                             {      

                                                             name: "W/O#: ",

                                                             type: "static_text",

                                                             },

          

                                                             {      

                                                             item_id: "txt2",

                                                             type: "edit_text",

                                                             multiline: true,

                                                             width: 100,

                                                             height: 30

                                                             },

       

                                                             {            

                                                             name: "QTY: ",

                                                             type: "static_text",

                                                             },

          

                                                             {      

                                                             item_id: "txt3",

                                                             type: "edit_text",

                                                             multiline: true,

                                                             width: 100,

                                                             height: 30

                                                             },

       

                                                             {      

                                                             name: "Issue Date: ",

                                                             type: "static_text",

                                                             },

          

                                                             {      

                                                             item_id: "txt4",

                                                             type: "edit_text",

                                                             multiline: true,

                                                             width: 100,

                                                             height: 30

                                                             },

       

                                                             {      

                                                             name: "Issue To: ",

                                                             type: "static_text",

                                                             },     

                                                          

                                                             {      

                                                             item_id: "txt5",

                                                             type: "edit_text",

                                                             multiline: true,

                                                             width: 100,

                                                             height: 30

                                                             },

                                  {

                                     type: "view",

                                     char_height: 10,

                                     elements:

                                     [

                                                             {   

                                                             type: "static_text",

                                                             item_id: "stat",

                                                             name: "Check What applies",

                                                             char_width: 15,

                                                             alignment: "align_fill",

                                                             font: "dialog",

                                                             },

                                        {

                                           type: "view",

                                           char_width: 8,

                                           char_height: 8,

                                           align_children: "align_top",

                                           elements:

                                           [

                                               {

                                                  type: "view",

                                                  char_width: 8,

                                                  char_height: 8,

                                                  elements:

                                                  [

                                                     {

                                                             type: "check_box",

                                                             item_id: "Chk1",

                                                             name: "1st, 10th, Last",

                                                     },

       

                                                     {

                                                             type: "check_box",

                                                             item_id: "Chk2",

                                                             name: "100%",

                                                     },

       

                                                     {

                                                             type: "check_box",

                                                             item_id: "Chk3",

                                                             name: "Sticker",

                                                     },

       

                                                     {

                                                             type: "check_box",

                                                             item_id: "Chk4",

                                                             name: "IP Sheet",

                                                     },

       

                                                     {

                                                             type: "check_box",

                                                             item_id: "Chk5",

                                                             name: "Final Inspection Required",

                                                     },

       

                                                     {        

                                                             type: "ok_cancel",

                                                             ok_name: "Ok",

                                                             cancel_name: "Cancel"

                                                     },

                                                  ]

                                               },

                                           ]     

                                        },      

                                     ]

                                  },    

                                ]      

                             },

                          ] 

                       }    

        };

       

       

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

        {

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

        {

         // var cMsg = dialog.DueValue;

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

         // event.source.source.info.ControlStamp = cMsg;

       

          cMsg = "\n" + dialog.DueValue;

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

       

          cMsg = "\n" + dialog.WorkOrderValue;

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

       

          cMsg = "\n" + dialog.QuantityValue;

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

       

          cMsg = "\n" + dialog.IssueDateValue;

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

       

          cMsg = "\n" + dialog.IssueToValue;

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

       

          // this.getField("cb1").checkThisBox(0, DiaBox.cb1Value);   these didn't work either....

          // this.getField("cb2").checkThisBox(0, DiaBox.cb2Value);

          // this.getField("cb3").checkThisBox(0, DiaBox.cb3Value);

          // this.getField("cb4").checkThisBox(0, DiaBox.cb4Value);

          // this.getField("cb5").checkThisBox(0, DiaBox.cb5Value);

       

       

          this.getField("cb1").value = dialog.cb1Value ? "Yes" : "Off";   // Thanks George for this....This is what I'm trying now....should I be using "OFF" ?..?

       

        }

      }