I created one formula field in contact object. When I give text with numbers(Before text and numbers(Ex: tsdhsgj12) or after text and numbers(Ex: 12gsdjgsjgfs)) in the input contact custom filed, it will save or allow only two digit numbers. Not displaying error message or validation messages. Could you please anybody help on this.

Currently using IF(ISBLANK(Test__c), 0, 1) in the formula field.

  • @Folkert, Please give any related example as per above requirement – Preeth Nov 28 '17 at 10:16
  • What is the use case? What is the field type of Test__c? If you want to get any help, you need to provide more information. – Folkert Nov 28 '17 at 10:25
  • @ Folkert, Test__c field type is Text. When I give the Text with numbers in the field it will choose only numbers. Do not take text with out error message. – Preeth Nov 28 '17 at 10:32
  • Do you mean you want a validation rule? That's something else than a formula field, although it uses the same concepts. – Folkert Nov 28 '17 at 10:37
  • @Folkert, If possible in the validation rule please give me suggestion. Other wise using formula field please give me suggestion. – Preeth Nov 28 '17 at 10:41

If I understand your use case correctly, you want to prevent saving of the record if the field contains text instead of just numbers. This can be achieved by using a validation rule.

Make a validation with the following formula:


This will be true if the field contains more than just numbers and will thus fire the validation and prevent saving of the record.

|improve this answer|||||
  • It is working fine as well as I send previous code. But I don't want showing error messages. When enter the text and numbers(Ex: tester32test), In this example '32' will be saved don't save the text. – Preeth Nov 28 '17 at 13:26
  • I'm not sure if that's possible with formulas. You might need to resort to Apex to solve this. – Folkert Nov 29 '17 at 13:21

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.