function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HarmpieHarmpie 

VLOOKUP not working as described in manual?

In the help for VLOOKUP() it says:
VLOOKUP(field_to_return, field_on_lookup_object, lookup_value) and replace field_to_return with the field that contains the value you want returned, field_on_lookup_object with the field on the related object that contains the value you want to match, and lookup_value with the value you want to match.
 
However when I try to save:
 
IF(VLOOKUP($ObjectType.Sales_History__c.Fields.Checksum__c,$ObjectType.Sales_History__c.Fields.Checksum__c,  Checksum__c)= Checksum__c,True,False)
 
I receive the error:
Error: Incorrect parameter for function VLOOKUP(). Expected Record Name field.
 
Why doesn't the manual mention that this field_on_lookup_object MUST be a Name field?? When I try:
 
IF(VLOOKUP($ObjectType.Sales_History__c.Fields.Checksum__c,$ObjectType.Sales_History__c.Fields.Name,  Checksum__c)= Checksum__c,True,False)
 
I receive no errors, but ofcourse this is not what I want :(
 
Is this behaviour intended anyway and will you adjust the help text, or is the VLOOKUP() simply not working as intended? Or am I doing something wrong?



Message Edited by Harmpie on 11-14-2008 08:05 AM
AdminisaurusRexAdminisaurusRex
The Tips section of the Help reference site has this statement by their VLOOKUP help https://na5.salesforce.com/help/doc/en/customize_functions.htm#VLOOKUP
 
"The field_on_lookup_object must be the Record Name field on a custom object"
 
Unfortunately I can't help you with more than that at this time.  Sorry.
HarmpieHarmpie
Yea I noticed this later too, when I found out that it ain't working. The quoted bit from the help suggests something else though. To be honest, if it only works on the Name field, it makes the vlookup() only useful for a fraction of it's potential... in my case, it's even completely useles.


Message Edited by Harmpie on 11-16-2008 09:57 AM