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
Natalia Rex 1Natalia Rex 1 

and if statement

Hello, Im wanting to implement a formula that checks two conditions, if the value of a picklist is MSA Missing, and if the record is new. Unfortunately when I enter the code below, I get  syntax error that I have an additional ). When I remove it (and there is two at the end), I get the following error

"Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2"

AND (
IF(
ISPICKVAL(Type, "MSA Missing"),
ISNEW()
)))


Do I have the ) signs in the wrong place?

I've looked at the documentation and I cannot find information on how I can implement this

Best Answer chosen by Natalia Rex 1
CharuDuttCharuDutt
Hii Natalia
Try Below Formula
AND(ISPICKVAL(Type, 'MSA Missing'), ISNEW())

++++++++++++++++++++++++++++++++++++++++++++++++++++

IF(AND(ISPICKVAL(Type, 'MSA Missing'), ISNEW()),true,false)
Please Mark It As Best Answer If It Helps
Thank You!

 

All Answers

CharuDuttCharuDutt
Hii Natalia
Try Below Formula
AND(ISPICKVAL(Type, 'MSA Missing'), ISNEW())

++++++++++++++++++++++++++++++++++++++++++++++++++++

IF(AND(ISPICKVAL(Type, 'MSA Missing'), ISNEW()),true,false)
Please Mark It As Best Answer If It Helps
Thank You!

 
This was selected as the best answer
Natalia Rex 1Natalia Rex 1
Thank you! It works.