You need to sign in to do that
Don't have an account?
Barak
Concatenate 0 if length is 7
I want to create a validation rule that trigger:
If length of ARC Number_C is 7 then concatenate 0 to the ARC Number_C.
I am trying following equation:
IF( LEN( ARC_Number__c ) = "7" ,"0" & ARC_Number__c , ARC_Number__c )
But fail and receives a error message"
Error: Incorrect parameter type for function 'LEN()'. Expected Text, received Number
Thanks,
Naveen
You probably want a workflow rule. A validation rule cannot perform field updates.
You are receiving an erorr because the LEN() function operates on Text. You must convert ARC_Number__c to text first, and then apply the LEN() function. So your workflow rule criteria would be
Then you would create the following field update on ARC_Number__c, associated with that workflow rule:
That would prepend a 0 to ARC_Number__c if the length of ARC_Number__c is seven (that is, has seven digits).