SmartClient Version: v8.3p_2013-06-16/PowerEdition Deployment (built 2013-06-16)
In a particular ListGrid I've added a formula column with the expression M+N. The formula builder declares it a valid formula and both fields M and N are type="integer" but the result of the formula is a concatenation of the two numbers as strings. "00" in the case where M=0 and N=0. When M=1 and N=0 the result is "10".
This does not happen on other grids. The developer console shows this warning.
17:59:10.177:TMR0:WARN:FormulaBuilder:Error attempting to convert formula text 'M+' to a function:syntax error
In this case, the datasource that backs the grid is created dynamically in client side code by 'cloning' fields from other datasources. The technique I'm using to clone the fields is new DataSourceField(otherDS.getField("fieldName").getJsObj()). Is that the correct way to clone the field? I need to take all of the fields attributes from the other datasource when creating the new field.
In a particular ListGrid I've added a formula column with the expression M+N. The formula builder declares it a valid formula and both fields M and N are type="integer" but the result of the formula is a concatenation of the two numbers as strings. "00" in the case where M=0 and N=0. When M=1 and N=0 the result is "10".
This does not happen on other grids. The developer console shows this warning.
17:59:10.177:TMR0:WARN:FormulaBuilder:Error attempting to convert formula text 'M+' to a function:syntax error
In this case, the datasource that backs the grid is created dynamically in client side code by 'cloning' fields from other datasources. The technique I'm using to clone the fields is new DataSourceField(otherDS.getField("fieldName").getJsObj()). Is that the correct way to clone the field? I need to take all of the fields attributes from the other datasource when creating the new field.
Comment