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
LouisaLines-scraseLouisaLines-scrase 

Workflow formula that compares 2 picklists Values - PLEASE HELP ME! :(

Hi there,

 

I am new to formula writing and am at the end of my teather  and embarrassed about it too as I think this ought to be very simple.

 

I have 2 Picklists; "Picklist 1_c" and "Picklist2_c" . The values withing the picklists are the same.

 

I need an email to be sent to User X if a record is created or edited and the value of Picklist1_c is equal to the value of Picklist2_c.

 

I have tried to use the IF function snad the ISPICKVAL but I dont seem to be winning.  I have been trying for 2 days and am losing the will to live - someone take pity on me.. pleeeease ??

Best Answer chosen by Admin (Salesforce Developers) 
SporterSporter

Ah my bad overlooked the workflow part it seems, TEXT() on a picklist won't work in the workflow portion.

 

You have two choices, you can create a formula field using the same formula I already gave:

 

IF(TEXT(Picklist1__c) = TEXT(Picklist2__c), "true", "false")

 

Then use the workflow to check that formula field then run the update or you can build a workflow formula to check each value against each value which depending on how many picklist values you have may not be possible in the character limit.

 

All Answers

SporterSporter

Try:

 

 

IF(TEXT(Picklist1__c) = TEXT(Picklist2__c), true, false)

 

As your workflow criteria this will simply say if the text of these two picklists are the same fire the rule (true) else don't fire it (false), then the email alert is up to yourself.

 

 

Picklist values need to be identical to work.

 

Let me know if you have any problems with the above.

LouisaLines-scraseLouisaLines-scrase

Hi Mate,

 

Thanks ever so much for coming back to me - I did as you said but I got he error messge below:

 

Error: Incorrect parameter for TEXT. Expected Number, Date, DateTime, received Picklist

SporterSporter

Ah my bad overlooked the workflow part it seems, TEXT() on a picklist won't work in the workflow portion.

 

You have two choices, you can create a formula field using the same formula I already gave:

 

IF(TEXT(Picklist1__c) = TEXT(Picklist2__c), "true", "false")

 

Then use the workflow to check that formula field then run the update or you can build a workflow formula to check each value against each value which depending on how many picklist values you have may not be possible in the character limit.

 

This was selected as the best answer
LouisaLines-scraseLouisaLines-scrase

Ok  I will give it a go and let you know how i get on , i think I understand what you mean - thank you so much for helping me!

SporterSporter

If you have any other questions just ask.

LouisaLines-scraseLouisaLines-scrase

Hi Again..

 

No Im sorry I tried but Im just not getting it, I feel really dense. And frustrated with myself.  Can you explain it to me in more detail if you have the time.

 

Apologies.

 

Kindesst,

 

Lou

 

 

 

LouisaLines-scraseLouisaLines-scrase

hang on hang on.. i know what you mean - thanks  mate!!

SporterSporter

If you have any difficulty let me know and I'll try and explain in more detail. If my solution above worked mark it as solved when you get a chance.

LouisaLines-scraseLouisaLines-scrase

Hi there, 

 

I thought I did mark it as solved already; i "accepted as solution".  What I have dont is set up a number of wrokflow rules but instead of writing one formula.  

 

Is there anything else i must do to verify it as a solution?

SporterSporter

No that's perfect I must have missed it when I made my post, appreciated.