Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

How to use condition variables #3887

hoabka ·

I have 2 variables in my configuration.
Var1 is a selection box named: option with 2 choices A, B
Var2 only show if var1 choice is A (invisible if the var choice is B).
I setup my grovy script in condition field on var2 as below.

groovy:
  import com.pmease.quickbuild.model.Configuration;
  import com.pmease.quickbuild.entitymanager.ConfigurationManager;
  import com.pmease.quickbuild.Context; 
  import com.pmease.quickbuild.variable.VariableWrapper;
  
  String opt = vars.get("option").toString();
  if ( opt == "A" )
    return true;
  else 
    return false;

But I always get the value of null of opt variable. Can you help us to check this case. Thank you

  • replies 1
  • views 871
  • stars 0
robinshen ADMIN ·