3 Replies Latest reply on Jul 31, 2013 6:32 AM by 869241

    OATS: Want to change string value to int




      I have taken a value from csv file to a variable of string type.




      ScnroClass     Scnro_NUM

      AM                    1

      BM                    2


      String getClassNum=eval("{{db.scnro_focus.scnro_num}}").toString();


      It will give me result like "1" or "2" in variable getClassNum


      I was trying to change this variable to int type and using Number() function, but it is not changing the value to int type and giving me error "The method Number(String) is undefined for the type script"


      int sf_no=Number(getClass);


      Can anyone please let me know how to change a string value to int type.


      Basically i want to take these int values of column "Scnro_NUM" from my csv file in switch statement.



      Deepak Khari