using accouting j's

How could I add two fields in the data field? For example I need to add total fee plus advance fee =forbsusp.

Below what I have created but not work.

var num1 = record.fields[‘CorpAdvance’]

var num2 = record.fields[‘EscAdv’]

function parseCurrrency(num){

return parseFloat(num.replace(/,/g, ’ '));

}

alert(parseCurrency(num1)+parseCurrency(num2))

Any suggestion on how I can make this work differently?

It looks like you’re replacing the comma(,) with a space ( ) and then trying to convert it to a float. What happens if you replace with ‘’ (two single quotes, no space)?

Also, your function name and function call don’t match. The function name you defined is parseCurrrency. Try correcting that and see what it returns.