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
Admin User 6112Admin User 6112 

I'm trying to build a nested Or statement using 10 different PICKLIST values.

Here's what I have in "English": If the value in a picklist field is one of 2 values, then put a 1 in the formula field. If it is one of two different picklist vales, place a 2, etc. There are 5 pairs of these. The syntax checker says "Error: Syntax error". Do I need another layer of ORs, different punctuation? I don't know. Pleae help!

IF(OR (InspectionType__c="Type 1",Inspectiontype="1. Complete Final Inspection with full H&S diagnostics and air leakage diagnostics"),"1",
IF(OR (InspectionType__c="Type 2",Inspectiontype="2. Final Inspection with full health and safety diagnostics"),"2",
IF (OR (InspectionType__c="Type 3",Inspectiontype="3. Final Inspection with air leakage diagnostics"),"3" , 
IF (OR (InspectionType__c="Type 4",Inspectiontype="4. Final Inspection with gas leak test only"),"4", 
IF (OR (InspectionType__c="Type 5",Inspectiontype="5. Final Inspection with no diagnostics"),"5", "0")))))
Admin User 6112Admin User 6112
I phrased this better on a different thread: https://developer.salesforce.com/forums/?id=9060G000000I6RlQAK -- If you think you can help, could you look over there please?
I tried to delete this thread, but did not succeed.