I am trying to use nested IF statements to get a field to populate a country. It seems like no matter what I try I get the same result. Can you help me understand this structure?
The reason for wrapping the fields in TEXT() is due to the fact they are dropdown menus.
The error I get returned when I check the syntax is "Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 4"
Thank you for your help!
IF(
TEXT(Guest__r.ID_Type__c) = "Passport",
TEXT(Guest__r.ID_Locale_Country__c),
NULL,
(IF(
TEXT(Guest__r.ID_Type__c) = "Drivers License",
TEXT(Guest__r.Country_of_Residence__c),
NULL,
(IF(
TEXT(Guest__r.ID_Type__c) = "State ID",
TEXT(Guest__r.Country_of_Residence__c),
NULL,
(IF(
TEXT(Guest__r.ID_Type__c) = "Military ID",
TEXT( Guest__r.Country_of_Citenzenship__c),
NULL,
(IF(
TEXT(Guest__r.ID_Type__c) = "Birth Certificate",
TEXT(Guest__r.ID_Locale_Country__c),
NULL
)
)
)
)
)
)
)
)
)