AnsweredAssumed Answered

Service Catalog 17.1 nodup_dup:function

Question asked by Terry.1 on Dec 5, 2018
Latest reply on Dec 10, 2018 by Terry.1

I am trying to prevent two fields on a form from having the same value by using the nodup function. My form is complete and functioning except I need to have different values in the Technical Contact (tech_contact = _id value on form) and the Verifier Contact (verifier - _id value on form) fields. I have tried several different java script functions, ca_fdGetTextFieldValue, ca_fdFetchSelectData, and so on and I have also tried it using the submitting:function(){

 

Thanks

 

nodup_dup:function(){
  var re = ca_fdGetSelectedOptions('form_id_value','tech_contact');
  var ve = ca_fdGetSelectedOptions('form_id_value','verifier');
  var re_st = re.toString();
  var ve_st = ve.toString();
  if(re_st == ve_st){
    alert("The technical contact and the change verifier cannot be the same person.\r\nPlease correct before submitting.");
 {ca_fdUnselectAllOptions('form_id_value','verifier', '');}
 {ca_fdUnselectAllOptions('form_id_value','tech_contact', '');}
    }
  },

Outcomes