Flexible/Dynamic Condition for #CALC_SUM

Posted by Rollbase User on 03-Apr-2012 00:48

Hi, is there a way to make more flexible/dynamic condition such as sql query like IN on #CALC_SUM. I got an error using this: var condition="id IN (15,34,55)"; var total=#CALC_SUM.money( amount_oi | condition ); But using this would always work: var total=#CALC_SUM.money( amount_oi | "id IN (15,34,55)" ); My need is to make the condition as flexible as possible like the ids inside the IN statement could be changed/assigned dynamically.

All Replies

Posted by Admin on 03-Apr-2012 03:37

Hi herbs,



You will have to do and selectNumber with sum(column) in this instance.

The conditions within a group token is static that's why the straight string input works and the variable input does not. When you enter the variable inside the group token it most probably treats it as a column and returns the error since there is probably no existing column by the integration name of 'condition'.



Hope this helps

Piscoso, Martin

Rollbase

This thread is closed