Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a excel sheet with a list of expressions and gave each one a name, now how do i reference that expression in a qvw file? i am doing this:
I am doing this =only({1<ExpressionName={Name}>}Expression), how do I get it to convert the expression to actually do the calculation instead of showing the expression
Try:
=$(=only({1<ExpressionName={'Name'}>}Expression))
I do it like this :
$(=FieldValue('MyField',1))
where MyField is the fieldname in excel and 1 is the first value (expression) in it which you want to use.
expression is like this in excel:
num(sum({<Rubriek = {'MARGE'}, BoekJaar = {$(=max(BoekJaar))}, BoekingsPeriode = {'<=$(=max(BoekingsPeriode))'}>}Waarde)
Dirk
An alternative is to move part of the logic to the script; to create one variable per expression. Then you can refer to the expression directly and your expressions in your objects will become much simpler:
ExpressionList:
Load ExpressionName, Expression From ExpressionList.xls ;
For vExpressionNumber = 0 to NoOfRows('ExpressionList')-1
Let vExpressionName = Peek('ExpressionName',vExpressionNumber,'ExpressionList');
Let vExpression = Peek('Expression',vExpressionNumber,'ExpressionList');
Set $(vExpressionName) = '$(vExpression)';
Next vExpressionNumber
Drop Table ExpressionList;
HIC