Loading
How to access custom control value
I have added a custom Checkbox Control to the SQLServerSelect dialog and would like to access its value in my installscript. Can someone please help me to know how to use this function correctly (or another function), etc. so I can use to access it's value? I've tried the following function (CtrlGetState) but It doesn't seem to work as expected, or I'm probably doing it wrong.

 

I'm probably coding it wrong. Can someone please give me guidance. THANKS!!!!!!!!

 

I've tried the following, but I'm not getting it right (or its the wrong function)

 

NUMBER nState, nResult;

 

STRING szIfEncrypt,szMsg,szServer;

 

//Control Identifier

 

define ENCRYPTCHECKBOX 17818

 

////////////////////////////////////////

 

//Display dialog

 

Dlg_SQLServerSelect:

 

szMsg = "";

 

szServer = MW_SERVERNAME;

 

SQLRTInitialize2();

 

nResult = SQLServerSelect( szMsg, szServer );

 

/////////////////////////////////////////

 

//Here it is

 

nState = CtrlGetState("DialogId_10110", ENCRYPTCHECKBOX);

 

//The (name) of the checkbox is CheckBox1, its Control Identifier is 17818.

 

//The Dialog name seems to be DialogId_10110 and it's Resourse Identifier is 10110. I've also tried "SQLServerSelect" with the same results.

 

 

if (nState = BUTTON_CHECKED) then

 

MessageBox( "button checked", 0 );

 

szIfEncrypt = "true";

 

endif;

  • Hi,

     

    you have to overwritten the function SQLServerSelect

     

    from SQLServerSelectDlg.rul

     

    You have to put another parameter to this function,

     

    which gives back the state of a button.

     

    Let's look at AskOptionsDlg.rul how to get the button state.
    Expand Post

Loading
How to access custom control value