+ Start a Discussion
Ashmi PatelAshmi Patel 

Incorrect parameter type for function 'LEN()'.

LEN(ZIP_Code__c) > 0 &&
(Country__c = "USA" || Country__c = "US") &&
VLOOKUP(
$ObjectType.ZIP_Code__c.Fields.City__c,
$ObjectType.ZIP_Code__c.Fields.Name,
LEFT(ZIP_Code__c,5))
<> City__c

what is the error....??
thnx, in advance
Best Answer chosen by Ashmi Patel
YogeshMoreYogeshMore
Try this one,
LEN(TEXT(ZIP_Code__c)) > 0 && (Country__c = "USA" || Country__c = "US") && VLOOKUP( $ObjectType.ZIP_Code__c.Fields.City__c, $ObjectType.ZIP_Code__c.Fields.Name, LEFT(TEXT(ZIP_Code__c),5)) <> City__c

All Answers

FearNoneFearNone
try to change it to LEN("testing")
if it works, then there is something wrong with ZIP_Code__c.
ZIP_Code__c must be of type Text or String.


Best Regards!
YogeshMoreYogeshMore
Hi Ashmi,

Try following formula.
 
LEN(TEXT(ZIP_Code__c)) > 0 &&
(Country__c = "USA" || Country__c = "US") &&
VLOOKUP(
$ObjectType.ZIP_Code__c.Fields.City__c,
$ObjectType.ZIP_Code__c.Fields.Name,
LEFT(ZIP_Code__c,5))
<> City__c


Let us know if it helps you.

Regards,
Yogesh More
Salesforce consultant || Salesforce Developer
more.yogesh422@gmail.com || www.yogeshmore.com 
Skype:-yogesh.more44
 
Ashmi PatelAshmi Patel

Hey, Yogesh
still getting error
LEN(TEXT(ZIP_Code__c)) > 0 && (Country__c = "USA" || Country__c = "US") && VLOOKUP( $ObjectType.ZIP_Code__c.Fields.City__c, $ObjectType.ZIP_Code__c.Fields.Name, LEFT(ZIP_Code__c,5)) <> City__c

ERROR :: Incorrect parameter type for function 'LEFT()'.
YogeshMoreYogeshMore
Try this one,
LEN(TEXT(ZIP_Code__c)) > 0 && (Country__c = "USA" || Country__c = "US") && VLOOKUP( $ObjectType.ZIP_Code__c.Fields.City__c, $ObjectType.ZIP_Code__c.Fields.Name, LEFT(TEXT(ZIP_Code__c),5)) <> City__c
This was selected as the best answer
Ashmi PatelAshmi Patel
thnxx