0

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

0

I believe the issue here is with the ISBLANK function used for Salary. Salary field seems to be of number data type and hence ISBLANK() will always return false, if there is no value in the field.

In order for ISBLANK() to return true, please select the "Treat blank fields as blanks" under Blank Field Handling while the Advanced Formula subtab is showing.

If you use this function with a numeric field, the function only returns TRUE if the field has no value and is not configured to treat blank fields as zeroes.

  • Salary field is not number datatype,it is currency data type,If i give empty value in salary field, is blank function is considering the field contains value,How to overcome this issue@Shailesh Deshpande – KS Kumaar Oct 7 '16 at 7:36
  • As i said, have you selected the checkbox - "Treat blank fields as blanks". It should work. – Shailesh Deshpande Oct 7 '16 at 7:40
  • Yeah @Shailesh Deshpande, I am checking this. Will update soon by checking this – KS Kumaar Oct 7 '16 at 7:46
  • Yes Shailesh Deshpande, I got it. Now i am getting correct one by following your procedure. Thank you Shailesh Deshpande – KS Kumaar Oct 7 '16 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.