4 Replies · Latest reply on Jan 3, 2018 6:05 PM by Shiraz Bhojani

    Scratchpad contains unexpected values

      I am trying to capture the value of a field called Incident (u_er_incident) on a catalog item. the following is the process I am using:

       

      Run Script:

      workflow.scratchpad.incident = 'u_er_incident';

       

      If:

      workflow.scratchpad.result = ifScript(); 

      function ifScript() { 

          var result = {u_er_incident:false}; 

       

          if (JSUtil.notNil(workflow.scratchpad.trigger)) { 

              if (workflow.scratchpad.incident == 'true') { 

                  result.incident = true; 

              } 

      return result; 

      }

       

      If Condition Property: Incident

      Condition: workflow.scratchpad.result.incident == true

       

      I am always getting a false.