Incorrect Number of Parameters for function 'IF().' - Formula Help! - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Amy BellAmy Bell 

Incorrect Number of Parameters for function 'IF().' - Formula Help!

I'm trying to fix up my formula field. Right now, it shows a view with a person's name and then their Company. If the person doesn't have a Company, it currently shows "Amy Bell," as an example - so the comma shows even when there is nothing in the Company field. I'm trying to adjust the formula so if there is no Company, it just shows the name with no comma hanging out there but am having issues. Here's what I have:

User-added imageAny help/guidance appreciated! Thank you!

Best Answer chosen by Amy Bell
Madan Lal BakoliyaMadan Lal Bakoliya
Replace + with comma "," in your if condition after NULL check.
something like this,
Firstname &" "& Lastname + If( NU_PrimaryAffiliation__r.Name !=null," ,"+NU_PrimaryAffiliation__r.Name,null)

Thanks

All Answers

Madan Lal BakoliyaMadan Lal Bakoliya
Replace + with comma "," in your if condition after NULL check.
something like this,
Firstname &" "& Lastname + If( NU_PrimaryAffiliation__r.Name !=null," ,"+NU_PrimaryAffiliation__r.Name,null)

Thanks
This was selected as the best answer
Amy BellAmy Bell
Thank you so much, that did the trick! I appreciate the help and quick response!
Madan Lal BakoliyaMadan Lal Bakoliya
Glad to help, if you don't mind, would you consider to close this thread by selecting best answer.

Thanks 😊
Happy learning!