Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Grabbing the current Data Value
jballnik
Hi Gang,
I would like to start a running summation of a dollar amount within the script for a Data Value component. I see that there are several methods to choose from including OnPrepare and OnRender. My question is how to capture the current value of the data field? In the expression building the value is this:
dataSetRow["payamount"]
but this code in the script does not work:
payAmount = payAmount + dataSetRow["payamount"]
How do you represent dataSetRow["payamount"] within the script method.
thanks,
John B
Find more posts tagged with
Comments
SpaceMan
Make sure you're using a global variable for the summation.
Use the Fetch method of the Data Set. I usually call it out after i map all my data set values into the rows.
EX:
if (!taskChangesDataSet.fetch())
return (false);
// Add a line for each output column
// The specific get method should match the data type of the output column.
dataSetRow["payamount"] = taskChangesDataSet.getString("payamount");
payAmount = payAmount + dataSetRow["payamount"];