+ Start a Discussion
umair khan 15umair khan 15 

how can i use text encrypted field in validation. i created a PANCARD field and i am trying to apply validation on it but it seams like they are considering some value in it even after leaving it blank.... this is validation formula i used

Best Answer chosen by umair khan 15
Raj VakatiRaj Vakati

use LEN instead of ISBLANK for encrypted text.
 
IF(LEN(Password__c)==0,0,1)

use this
 
AND(ISPICKVAL( City__c ,'Hyderabad'),
IF(LEN(PANCARD__c )==0,0,1)
IF(LEN(Phone_No__c)==0,0,1)
IF(LEN(Email__c )==0,0,1)


 )

 

All Answers

umair khan 15umair khan 15
AND(ISPICKVAL( City__c ,'Hyderabad'),
ISBLANK( PANCARD__c ),
ISBLANK( Phone_No__c),
ISBLANK( Email__c )
 )

Note: This formula is not working
Raj VakatiRaj Vakati

use LEN instead of ISBLANK for encrypted text.
 
IF(LEN(Password__c)==0,0,1)

use this
 
AND(ISPICKVAL( City__c ,'Hyderabad'),
IF(LEN(PANCARD__c )==0,0,1)
IF(LEN(Phone_No__c)==0,0,1)
IF(LEN(Email__c )==0,0,1)


 )

 
This was selected as the best answer
umair khan 15umair khan 15
Thank you so much. This Len function worked but I didn't use as you said. I used the following formula
AND(ISPICKVAL( City__c ,'Hyderabad'),
LEN( PANCARD__c )==0,
ISBLANK( Phone_No__c),
ISBLANK( Email__c )
 )
but as I am a complete beginner in sales force it will be great if any of you can tell me why you used that additional (0,1),
I want to know how it is used.