8 Replies Latest reply on Oct 24, 2016 7:35 AM by stevenm8611492

    Dropdown list of 128 items, 7 items affects different fields, having problems with which code to use

    stevenm8611492 Level 1

      Dropdown list of 128 items, 7 items affects different fields, having problems with which code to use

       

      this does not work but it has no errors

       

      The functions work separately with the each owns "event.will commit"

       

       

      var CurrentValueCSk1 = this.getField("CSk1");

      for (var i=0; i < CurrentValueCSk1.numItems; i++)
      var CurrentValueCSk1Now = (CurrentValueCSk1.getItemAt(i,true) + ":  " + CurrentValueCSk1.getItemAt(i,false));

      if (CurrentValueCSk1Now == "Marksmanship") { if(event.willCommit){if(event.value == "") this.resetForm (["BSMarksmanship_Hid"]);
      else SetBSMarksmanshipFieldValues(event.value);}}

      else if (CurrentValueCSk1Now == "Very Strong") { if(event.willCommit){if(event.value == "") this.resetForm (["StrongVery_Hid"]);
      else SetStrongVeryFieldValues(event.value);}}

      else if (CurrentValueCSk1Now == "Strongman") { if(event.willCommit){if(event.value == "") this.resetForm (["Strongman_Hid"]);
      else SetStrongmanModifierFieldValues(event.value);}}

      else if (CurrentValueCSk1Now == "Very Resilient") { if(event.willCommit){if(event.value == "") this.resetForm (["VeryResilient_Hid"]);
      else SetVeryResilientFieldValues(event.value);}}

      else if (CurrentValueCSk1Now == "Lightning Relexes") { if(event.willCommit){if(event.value == "") this.resetForm (["ILightning_Reflexes_Hid"]);
      else SetLightningReflexesFieldValues(event.value);}}

      else if (CurrentValueCSk1Now == "Fleet Footed") { if(event.willCommit){if(event.value == "") this.resetForm (["MSFleet_Footed_Hid"]);
      else SetFleetFootedFieldValues(event.value);}}

      else if (CurrentValueCSk1Now == " ") { if(event.willCommit){if(event.value == "") this.resetForm (["VeryResilient_Hid", "Strongman_Hid", "StrongVery_Hid", "MSFleet_Footed_Hid", "ILightning_Reflexes_Hid", "BSMarksmanship_Hid"]);
      else SetResetSkillModifiersFieldValues(event.value);}}