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
AnonTestQuestAnonTestQuest 

NOT( ISPICKVAL( in IF( statement in formula help

I am trying to write a custom formula field. I am trying

IF(
NOT(
ISPICKVAL( Picklist_Item__r.Type  = "Individual"),
Desired_Output__c,
Else_Desired_Output__c
))

The error I'm getting is that a ) is missing but it highlights a ,

Thanks!
Best Answer chosen by AnonTestQuest
Pramodh KumarPramodh Kumar
Your formula should be 
IF( ISPICKVAL( AccountSource ,'Web'),Site, Sic )

replace the fields


Thanks,
pRAMODH.

All Answers

Pramodh KumarPramodh Kumar
For if statement you need IF(logical_test, value_if_true, value_if_false).

there is no true or false values in your formula 

Could you please explain what exactly you want.


Thanks,
pRAMODH.
AnonTestQuestAnonTestQuest
the logical test is if the picklist = "Individual"

if it's true then output field: Custom__c
if it's false then output field: Other__c
Pramodh KumarPramodh Kumar
Your formula should be 
IF( ISPICKVAL( AccountSource ,'Web'),Site, Sic )

replace the fields


Thanks,
pRAMODH.
This was selected as the best answer
karunakarreddy bade 8karunakarreddy bade 8

Hi ,

The if statement syntax is :
 IF(logical_test, value_if_true, value_if_false)

I thank the  formula should be like this: 

IF(NOT(ISPICKVAL( Picklist_Item__r.Type  = "Individual")),Desired_Output__c ,Else_Desired_Output__c)


Thanks,
B.karunakar
 
AnonTestQuestAnonTestQuest
Yeah, no, that's wrong. pRAMODH is right. There is no requirement for a NOT function in this statement. The ISPICKVAL takes care of that. His setup worked perfectly.

Thanks!!