Skip to main content
HI All,

 

I am trying to do numerical calculations on values in a picklist, the numericals values are already populated with the % sign at the end. I could change all the values and remove the % sign but I thought this should work 

 

VALUE( SUBSTITUTE(text( Field__c ), '%', ' ')) but I get an error.

 

SUBSTITUTE(text( Field__c ), '%', ' ')) returns a number alright so I can't understand why I am getting an error when I use VALUE.

 

Thanks
4 risposte
  1. 28 mag 2016, 02:44
    Trunde,

     

    Try these 2 steps:

     

    1)  Substitute with empty string instead of a blank as you have it now:

     

     

    Change (' ' to ''):

    VALUE( SUBSTITUTE(text( Field__c ), '%', ' '))

    to

    VALUE( SUBSTITUTE(text( Field__c ), '%', ''))

     

    2) Or Use the Trim function

     

     

    VALUE( TRIM(SUBSTITUTE(text( Field__c ), '%', '')))

     

    Thx

     

     
0/9000