YS

Hello all!

I want to use OpionBotton so that the user chooses one of two script execution options: 1. Uploading data to a file; 2. Download data from the file;

But I can not return the result after selecting one of the options. Help me please. This is my code: function getDialog1(){

   var flag = null;

   var dialog_templte = Dialogs.createNewDialogTemplate(0,0,400,200,"Settings");

   dialog_templte.OptionGroup("Choose");

   dialog_templte.OptionButton(15,25,390,15,"Uploading data to a file","V");

   dialog_templte.OptionButton(15,40,390,15,"Download data from the file", "Z");

   dialog_templte.OKButton();

   var myDialog1 = Dialogs.createUserDialog(dialog_templte);

   Dialogs.show(myDialog1);    this.getResult = function()

    {

      if(this.dialog.getPage(0).getDialogElement("V").isEnabled()){           

         flag = 0;

         Dialogs.MsgBox("Uploading: flag = 0");    // Did not appear

      }

      if(this.dialog.getPage(0).getDialogElement("Z").isEnabled()){           

         flag = 1;

         Dialogs.MsgBox("Downloading: flag = 1");  // Did not appear

      }

      Dialogs.MsgBox("Result: flag = " + flag);   // Did not appear

      return flag;

    }

   Dialogs.MsgBox("Result2: flag = " + flag);   // Appeared "Result2: flag = null"

   return flag;

}

Featured achievement

Genius
You like to help others solve their problems by answering questions.
Recent Unlocks
  • KF
  • KH
  • RG
  • Profile picture for user Vee_ARIS
  • Profile picture for user smarty
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock