I am facing an issue with a column named priclmdetailli55 in a file. This column can have no value, one value, or two values separated by a semicolon. I want to sum the values if they are separated by a semicolon.
This is my current approach:
var str = priclmdetailli55;
var1 = str.substring(0,str.indexOf(";") );
var2 = str.substring(str.indexOf(";") + 1, str.length + 1);
var1 = var1.replace(",", "");
var2 = var2.replace(",", "");
var var3 = parseint(var1) + parseint(var2);
{var var3}
Unfortunately, when I use this code, the column turns out to be blank. I would appreciate any tips or insights on how to fix this problem.