Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to adjust this Salesforce formula with IF statement?

Asked by Diya Tomar May 12, 2023 1.1K views 1 answer
Share

About this question

We have a formula field that references a picklist field. It should have data in it only for a certain record type, but somehow in migration it was populated on all records. I need to clear out those values. Since it's not possible to clear values from a formula field with Data Loader, I need to update the formula to say if the Stage picklist field is null, then null.

How do I update this formula to include that?

    If(AND(
    Text(Stage__c) <> "red",
    Text(Stage__c) <> "blue",
    Text(Stage__c) <> "green"), "Active", "Not Active")
UPDATE: commenter gives great additional context to how to look at this. For anyone wondering, the full solution here was this:
    IF(
    ISPICKVAL(Stage__c,""),"",
    IF(AND(
    Text(Stage__c) <> "red",
    Text(Stage__c) <> "blue",
    Text(Stage__c) <> "green"), "Active", "Not Active"))

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.