IT Process Automation

  • 1.  onSubmit validation not working with dropdown

    Posted Apr 20, 2016 11:26 AM

    On a basic change approval type task, which has a dropdown of 3 fixed values (Approve, Reject, More info) with underlying data values of (1, 0 , 2) respectively.  There is also a Blank entry that defaults on the form, and even though the field is required, this blank entry is acting as a valid selection

     

    I added the following Script and call the function on submit in the form:

    {
      onSubmitValidate :  function () {
        var yourValues = ca_pam_getSelectedOptionValues('Form.Status');
        if(yourValues== ' '){
          alert('Status Not Selected');
          return False;
        }
      else{
       return True;
      }
      },
    }
    

     

    When I generate a new task, and click complete without changing the Status dropdown selection, I do get the 'Status Not Selected' alert, but then the form continues to complete anyway, which makes it less than useful.

     

    Is there some other return I need to pass to actually stop the submit, or some other trick to avoid this issue with dropdown selections?



  • 2.  Re: onSubmit validation not working with dropdown
    Best Answer

    Broadcom Employee
    Posted Apr 22, 2016 11:12 AM

    Support issue has been opened for this.  Seems like a possible defect and level 2 has been engaged.