I want to format number from a variable where in the variable user can input one number say 1 or 2 , so now if they input 1 then we have to show 1 decimal places and for 2 we have to show 2 decimal places.I want to do that in for loop inside the load script. There will be a initial value for 0 decimal i.e. '#,##0'. I did based on the attached application. But I want a better approach.
Kindly check the attached app and help me to achieve this through for loop.