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
Pablo ArgentinaPablo Argentina 

VLOOKUP

Hi wise people.

 

I have a lot of problems with an IF + Vlookup forumal.

 

My idea is the following:

- I have a text filed where users have to add a code

- If code exists, then ERROR.

 

 

IF( VLOOKUP( $ObjectType.CODE__c.Fields.Name, $ObjectType.CODE__c.Fields.Name, CODE__c) <>"",TRUE,FALSE)



 

What am i  doing wrong???

 

thanks in advance

Pablo

 

Shashikant SharmaShashikant Sharma

Even though there is no issue in using IF and Vlookup but in your case You don't need IF condition try just this

 

 

VLOOKUP( $ObjectType.CODE__c.Fields.Name, $ObjectType.CODE__c.Fields.Name, CODE__c) <> ''

 

Pablo ArgentinaPablo Argentina

Thanks for your answer.

Unforutnatelly, it doesn't work.

 

No error, but nothing happens.

 

I think that the IF is needed.

 

I have to do a Vlookup, if the forumla found the CODE, then... TRUE, so... WRONG!!!

If it doesn't found the CODE, then FALE, all correct

Shashikant SharmaShashikant Sharma

Don't worry no need of IF as this formula itself will return either true or false as it is evaluating a condition, I have tested it out and working fine in my org, even though if you want to use IF you can use and it is also working fine in my org.

 

VLOOKUP( $ObjectType.CODE__c.Fields.Name, $ObjectType.CODE__c.Fields.Name, CODE__c) <> ''

 is CODE__c a multiline Text ?

Please share some information abot this field. And also check that Code__c object has the record with Name whatever text you are giving. Check the alphabets are in same case (Lower Case , Upper Case) .

Pablo ArgentinaPablo Argentina

WOW, that's too complex for me.

 

CODE__c is a text field (max char 15).

 

How do i check if the object has the record with the name?

 

tks

Shashikant SharmaShashikant Sharma

You just go and check CODE__c object has any record with the text you are giving , you can create a view filter to search.

AmitSahuAmitSahu

I hope you are using this formula in a validation rule and not while creating any formula field...

 

VLOOKUP is only available in Validation rules.

Pablo ArgentinaPablo Argentina
HAHAHA. I real
Pablo ArgentinaPablo Argentina

HAHAHA. I really suck with SalesForce

I don't understand how to create a view or check the object

 

How do i go and check if CODE__c object has any record with the text  i'm giving?

How do I create a view filter to search?

 

thanks again

Pablo ArgentinaPablo Argentina

I'm not good with this, but not stupid.

 

Of course is a validation rule!

 

tks