invoso.com Report post Posted 09/22/2010 12:49 PM How to use for example "ROUND (var/1000;0)" in evaluate expression to get result as $RV[AB] ?? Share this post Link to post
SupportTeam Report post Posted 09/22/2010 09:12 PM The result of the evaluated expression is automatically stored in the $RV[module_title] eg: If your evaluate expression module is named DoSomeCalc then the created $RV will be $RV[DoSomeCalc] You are able to see in the vgEngine traces what $RVs are created and what their values are. Please post vgEngine trace (.ZIPed) and script if you still have any questions. Share this post Link to post
invoso.com Report post Posted 09/23/2010 10:36 AM from logs: 141135,29 2 state [calculate_ABSPQ] Evaluate [ROUND($RV[calling_number]/10000;0)] 141135,29 2 rv replace start: [ROUND($RV[calling_number]/10000;0)] 141135,29 2 rv replace end: [ROUND(523602095/10000;0)] 141135,29 2 eval[ROUND(523602095/10000;0)] 141135,29 2 Error: 1006 141135,29 2 rv add [calculate_ABSPQ_Input]{ROUND(523602095/10000;0)} 141135,29 2 rv add [calculate_ABSPQ]{ROUND(523602095/10000;0)} 141135,29 2 rv add [ABSPQ]{ROUND(523602095/10000;0)} 141135,29 2 Eval Expr result:[ROUND(523602095/10000;0)] stored in $RV[ABSPQ] 141135,29 2 path {ROUND(523602095/10000;0)} not found 141135,29 2 matching path not found How to use functions like "ROUND" in Evaluation Expression module listed: http://www.voiceguide.com/vghelp/source/html/modevalexpr.htm ? I wrote in Expression to evaluate: ROUND($RV[calling_number]/10000;0) save as Variable: ABSPQ When i used "$RV[calling_number]\10000" it works, but in other place i need ROUND function (non integer result) Share this post Link to post
SupportTeam Report post Posted 09/23/2010 10:55 AM Trace shows that there is a semicolon separating the "expression" and the "numdecimalplaces" parts of the expression. It should be a comma: "," If you want to trim off the last 4 characters of the input string then you may want to use the Left function instead, something like this: Left("$RV[calling_number]", Len("$RV[calling_number]")-4) or if the length of number is always 9 then you can use: Left("$RV[calling_number]", 5) Share this post Link to post