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
SFDCneophyteSFDCneophyte 

Validation Rule - Any help would be greatly appreciated!!

Hello All,

 

I'm in need of a validation rule for a text field. Once that field has been populated w/ information it can not be changed.

 

See formula below:

 

IF(NOT(ISBLANK(Acquisition_Program_Name__c )), Acquisition_Program_Name__c,
ISCHANGED( Acquisition_Program_Name__c))

 

Received the following error:

 

Error: Incorrect parameter type for function 'IF()'. Expected Text, received Boolean

Best Answer chosen by Admin (Salesforce Developers) 
goabhigogoabhigo

Why don't you try just,

ISCHANGED(Acquisition_Program_Name__c)

 

This will work for the following scenario:

  • When the field is filled with some value and user try to change the value
  • Will not fire if the value was blank before and after editing.

Does this help? Let me know.

All Answers

@anilbathula@@anilbathula@
Hi SFDCneophyte,

Try this validation rule:-
AND(NOT(ISBLANK( PRIORVALUE( Acquisition_Program_Name__c ))),ISchanged(Acquisition_Program_Name__c ))
goabhigogoabhigo

Why don't you try just,

ISCHANGED(Acquisition_Program_Name__c)

 

This will work for the following scenario:

  • When the field is filled with some value and user try to change the value
  • Will not fire if the value was blank before and after editing.

Does this help? Let me know.

This was selected as the best answer
SFDCneophyteSFDCneophyte
Thank you. It worked perfectly
SFDCneophyteSFDCneophyte
Thank you. It worked perfectly!
SFDCneophyteSFDCneophyte

Thank you for providing a solution(s).  Both solutions worked perfectly!

 

ISCHANGED(Acquisition_Program_Name__c

 

and

 

AND(NOT(ISBLANK( PRIORVALUE( Acquisition_Program_Name__c ))),ISchanged(Acquisition_Program_Name__c ))