Function call not working
Function call not working
I have defined the following function to sum a list of values from a form...
float gamOrgBalanceSum(string clientID)
{
returnVal = 0.0;
for each gamOrgBalance in Client_Gaming_Account [(ClientID == input.clientID && (GBP_Balance != null))]
{
returnVal = (returnVal + gamOrgBalance.GBP_Balance);
}
return returnVal;
}
When I execute the function manually all works fine. However, when I execute the function from an HTML view as follows...
bal5 = thisapp.gamOrgBalanceSum(clientRow.nameCode);
I get the following error...
Error details:
Error occured while executing the script.
Unable to update variable
Error occured
There is nothing wrong with the argument passed into the function as the same reference has been passed to 5 other functions without problem.
I cannot see that I am doing anything wrong so would be grateful for any ideas as to what the problem may be.