2

We are moving to use X-Author to upload our planner information into Salesforce via their excel app. The excel spreadsheet has been set up prior and fields are pretty fixed. We are trying to map their status field but where ours was text values the Planner excel is 1,2,3,4 so I was trying to create a IF statement i.e.

IF ( Order_Status__c = 1, "Pseudo Machines – not sold", 
IF ( Order_Status__c = 2, "Sale Confirmed – waiting for spec",
IF ( Order_Status__c = 3, "Spec complete – BOM creation",
IF ( Order_Status__c = 4, "BOMs complete – procurement", 
IF ( Order_Status__c = 5, "Production orders released", 
IF ( Order_Status__c = 6, "Assembly Started", 
IF ( Order_Status__c = 7, "Shipping", 
IF ( Order_Status__c = 8, "Installation started", 
IF ( Order_Status__c = 9, "Complete – awaiting sign off",  
OR (Order_Status__c = 10, "Fully paid and signed off", "Please see Admin"
          ))))))))))

Not working. It is just a text field Order Status.

  • r u doing this in a formula field or workflow field update or apex code ? – Vamsi Krishna Jan 28 '16 at 2:04
  • It is supposed to be a picklist value, and ideally just a IF else scenario. I have it as a formula field now as picklist was not suited. – iamjury Jan 28 '16 at 2:07
  • 1
    @iamjury use ISPICKVAL – Ratan Paul Jan 28 '16 at 12:22
5

You can use CASE function and try something like this

CASE ( Order_Status__c ,
    1, "Pseudo Machines – not sold", 
    2, "Sale Confirmed – waiting for spec",
    3, "Spec complete – BOM creation",
    4, "BOMs complete – procurement", 
    5, "Production orders released", 
    6, "Assembly Started", 
    7, "Shipping", 
    8, "Installation started", 
    9, "Complete – awaiting sign off",  
    10, "Fully paid and signed off", 
    "Please see Admin"
)
| improve this answer | |
  • Is this for the picklist value or for formula? just trying to make sure. – iamjury Jan 28 '16 at 20:36
  • 1
    its for the formula field. – Vamsi Krishna Jan 28 '16 at 22:16
  • I used ISPICKVAL however snippet below. I get error message IF(OR(ISPICKVAL( Order_Status__c , "1"), FormulaField = "1"), 'Pseudo Machines – not sold', IF(OR(ISPICKVAL( Order_Status__c , "2"), FormulaField = "2"), 'Sale Confirmed – waiting for spec', IF(OR(ISPICKVAL( Order_Status__c , "3"), FormulaField = "3"), 'Spec complete – BOM creation', IF(OR(ISPICKVAL( Order_Status__c , "4"), FormulaField = "4"), 'BOMs complete – procurement', – iamjury Feb 2 '16 at 0:29
  • Error: Field FormulaField does not exist. Check spelling. But not sure what to put in there. Its a validation rule, based off a picklist (boss likes those) – iamjury Feb 2 '16 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.