+ Start a Discussion
tganikumartganikumar 

How to store String or decimal values in to custom field from visualforce to custom object records.

I declared one string(decimal) variable in visualforce page (apex class). And also i taken one object with field values (all fields are number type). in visualforce page i am calling that variable name in <apex:repeat> tag,

 

here what i want is, 

 

if i given values to those varible from visualforce page, it will effect to custom object record. Means if given one value as 10.0 then one field can take that value and if i given second value it will take second field. 

 

This is nothing but, Storing values to custom fields through visualforce page. 

 

I want, how to store these type of operations?

 

please give the solution ASAP.....

 

thanks

gani

raj123raj123

Hi Gani use the string function is alpha 

 

String s1 = 'abc';
// Returns true 
    
Boolean b1 = 
   s1.isAlpha();
System.assertEquals(
   true, b1);

 to check whether the input is string or not 

 if string store it in desired variable else store it in other variable

 

tganikumartganikumar

hi raj,

 

i understood this one, but how to store these values into custom fields...?