cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ssubbumv
Level 3

Could not update value in the Custom Dialog Input Box

Hi,

Here is my scenario. I have one custom dialogue in which I have one input box. There I added a new varaible "CR_VERSION" for the input box.

I want to set default value to this input box. Hence I added a event "QueryEnter" for this custom dialogue. Here is my code

public void queryEnterRequestVersion(com.installshield.event.ISQueryContext arg0)
{
String CRVersion;
try {
CRVersion = execute();
arg0.getServices().getISDatabase().setVariableValue(
"CR_VERSION","V34BTest");

arg0.getServices().getISDatabase().setVariableValue(
"RETURN_VAL", "true");
}
catch (ISDatabaseException dbe){
} catch(ServiceException e){
LogUtils.getLog().logEvent(this, Log.ERROR, e);
}

}

But It does not update the value which I'm passing thru the code. Please guide me where I'm doing mistake.

Thanks

Subramanian S
Labels (1)
0 Kudos
(1) Reply
enanrum
Level 9

It looks OK, just not sure what these statements are doing:

String CRVersion;
CRVersion = execute();

But this is all you would need to do:
arg0.getServices().getISDatabase().setVariableValue("CR_VERSION","V34BTest");

But you may want to do it in the Dialogs initializeUI event or put it in the Events Class in the OnBegin Install and set all your defaults there! That way you have one method if you want to change anything!

Better yet - I would use the 'Additional Tools' ->'Property Manager' to set a default value to a variable.
0 Kudos