How can I get the value from IntEdit
to a Init
on the datasource
of a table, the IntEdit
have Autodeclaration = yes
, this is my code:
Int Var;
Var = IntEditField.value(); //Doesn't work
Var = str2int(IntEditField.valueStr()); //Doesn't work
print Var;
The FormIntControl.value do return the int value of the control, so
should work. It will return zero of cause if the control has not been set. Beware, on
FormRealControl
it is namedrealValue
, on FormStringControltext
, consistency sucks.In older versions than AX 2012, you should place a semicolon after declarations like this:
Also, after setting the
AutoDeclaration
property, always recompile the form otherwise run-time errors or wrong behavior occurs.This and other similar questions indicates you are not accustomed to using bound controls or edit methods.