Dear Experts,
I have to get the previous year value based on the selected year. I have done the following at "On Startup" event:
var curr_year="";
curr_year = DROPDOWN_YEAR.getSelectedValue();
var prev_year="";
Further I have written the following code:
prev_year = curr_year - 1;
For the code written in bold, I am getting following error:
Error: "String" and "int" passed. The arguments of operator "-" must have the same type
To resolve this, I even tried the following code:
Convert.stringToInt(curr_year);
Convert.stringToInt(prev_year);
I browsed through various links. Few links are below:
Variable selection in Dropdown
I am still not able to get the previous year value. How to do simple mathematical calculation getting rid of string/int issues?
Please help.
Thanks and Regards,
Nitesh Kumar