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
Julia ArmentaJulia Armenta 

Workflow formula when field changes from specific picklist value to a specific picklist value

We have a Win Confidence field and we use 1, 2, 3, 4 as picklist options (1 is lowest confidence, 4 is highest). I want to create a formula that will send me an email anytime the Win Confidence moves from 4 to 3, 4 to 2, or 4 to 1.
Best Answer chosen by Julia Armenta
Anil GiriAnil Giri
Hi Julia,
Following formula will help you for alert, Alert will get only when the value changes 4 to any other.
AND(
    ISCHANGED(Win_Confidence__c), 
    ISPICKVAL(PRIORVALUE(Win_Confidence__c), "4") 
)

it will help you for the best .

Regards,
Anil

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Julia,

I trust you are doing very well

Please try this:

Evaluation Criteria: Evaluate the rule when a record is created, and every time it's edited
Rule Criteria: Account: Win_Confidence__c NOT EQUAL TO 4
Type: Email Alert


I hope it helps you.

Kindly let me inform if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas

 
Julia ArmentaJulia Armenta
Thank you for your prompt reply. This did not work, it is sending an alert for anytime the Win Confidence changes among 1, 2, and 3. I want an email ONLY when the Win Confidence moves FROM 4. So I don't care if the opportunity moves from 1 to 2, 2 to 3, 3 to 4...I ONLY want an alert when the Win Confidence moves from 4 to Win Confidence of 1, 2, or 3. 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Julia,

In Rule Criteria use this formula:

Rule Criteria:
AND( 
ISCHANGED( Win_Confidence__c ), 
TEXT(PRIORVALUE(Win_Confidence__c)) = "4" 
)

I hope it helps you.

Kindly mark this as solved if the information was helpful.

Thanks and regards,
Khan Anas
Anil GiriAnil Giri
Hi,
Evaluation Criteria: Evaluate the rule when a record is created, and every time it's edited

AND(
    ISCHANGED(Win_Confidence__c), 
      NOT(ISPICKVAL(Win_Confidence__c, "4")
    ) 
)


regards,
Anil
Julia ArmentaJulia Armenta
Khan Anas - your last formula didn't work - not sure if you need to add that this is a picklist? There are 4 choices total, and you can only pick one.


Anil Giri - Your formula did not work, it gave me an alert anytime that the Win Confidence changed that did not include 4...I want to only get an alert ONLY when it changes FROM 4.
Anil GiriAnil Giri
Hi Julia,
Following formula will help you for alert, Alert will get only when the value changes 4 to any other.
AND(
    ISCHANGED(Win_Confidence__c), 
    ISPICKVAL(PRIORVALUE(Win_Confidence__c), "4") 
)

it will help you for the best .

Regards,
Anil
This was selected as the best answer
Julia ArmentaJulia Armenta
Anil Giri - so it looks like my Label was "4" and API Name was "Commit". Once I changed the API Name to "4" the workflow worked! Do formulas need to reference the API Name instead of the field name? I never payed attention to the Label and API Name matching before.
Anil GiriAnil Giri
Julia,
Label name and API name may be defer,it's all depends on requirements,
You have to use API name here..... It will work fine