I created a formula field called Num__c for First name, last name, pancard, Phone, status and salary.
The functionality of formula field is, if I enter a value for First name and if i save it, Then the Num__c value should be updated with 1. Same like that if I enter value for First name and Last name, then the Num__c field value should be updated with 2. Likewise if i enter a values for Firstname, pancard, salary and email, then the Num__c should be updated with 4 and vice versa. Which means for how many fields i entered values, the same value should be updated with Num__c.
To achieve this functionality i created a formula which is given below
IF(ISBLANK( Name ) , 0, 1)+IF(ISBLANK( Last_Name__c ) , 0, 1)+IF(ISPICKVAL( Status__c, "") , 0, 1) + IF(ISBLANK( Email__c ) , 0, 1)+ IF(ISBLANK( Phone__c ) , 0, 1) + IF(ISBLANK( Pancard__c ) , 0, 1)+ IF(ISBLANK( Salary__c ) , 0, 1)
This formula field is giving correct value if i didn't use IF(ISBLANK( Salary__c ) , 0, 1). If i use salary field also it wrong value like if i save a record with only firstname(Here i never fill any field except firstname) and save it, Numm__c value giving 2.
I tried a lot but could not able to solve this problem.
if any one knows about this please help me. Thanks in advance