PDA

View Full Version : [CLOSED] StoreParameter : Pass conditional value



matrixwebtech
Jan 10, 2015, 7:43 PM
Hi please see bellow code


.Parameters(ps => {
ps.Add(new StoreParameter { Name = "GroupID", Value = @"if(Ext.isDefined(App.cmbGroupID))
{
return App.cmbGroupID.getValue()
}
else
{return 0}
", Mode = ParameterMode.Raw });
})

So is it possible to pass value based on condition ?

Daniil
Jan 12, 2015, 7:38 AM
Hi @matrixwebtech,

You can do the following.

Value="getParameter()"


var getParameter = function () {
if (Ext.isDefined(App.cmbGroupID)) {
return App.cmbGroupID.getValue();
}
else {
return 0;
}
};