Hello everyone,
I am trying to get a formula to work in the Formula field in the Entity Manager, that should output a 1 or 0, depending on whether or not there is a letter in the phone number field.
This is the formula I'm trying to use:
The field 'phoneNumber' is of the type 'Phone' and typically includes number strings, but sometimes also letters or a phrase like 'not provided'.
A second field, 'leadContainsPhoneNumber', which is a Boolean (checkbox that should be checked if output is 'TRUE' (or 0) and unchecked if output is 'FALSE' (or 1).
The expression should check if the string in the field phoneNumber contains any letter from a-z (or lower or uppercase). However, for some reason, the box in the records is always checked, even if letters are present. I cannot figure out if something in the syntax is incorrect, or if I am overlooking something relevant here.
Does anybody have an idea what might be wrong, or how to solve it?
I am trying to get a formula to work in the Formula field in the Entity Manager, that should output a 1 or 0, depending on whether or not there is a letter in the phone number field.
This is the formula I'm trying to use:
Code:
ifThenElse(string\test(phoneNumber, '.*[a-zA-Z].*'), leadContainsPhoneNumber=0, leadContainsPhoneNumber=1);
A second field, 'leadContainsPhoneNumber', which is a Boolean (checkbox that should be checked if output is 'TRUE' (or 0) and unchecked if output is 'FALSE' (or 1).
The expression should check if the string in the field phoneNumber contains any letter from a-z (or lower or uppercase). However, for some reason, the box in the records is always checked, even if letters are present. I cannot figure out if something in the syntax is incorrect, or if I am overlooking something relevant here.
Does anybody have an idea what might be wrong, or how to solve it?
Comment