Hi guys,
Is it possible validate the text written in a field?
The conditions for the text are as follows:
1 = It must have at least 5 letters.
2 = The first letter must be uppercase and the rest lowercase.
3 = It must not have spaces.
I have tried this formula and many others, but I can't get it to work.
AND(
LEN([_this]) >= 5,
UPPER(LEFT([_this], 1)) = LEFT([_this], 1),
LOWER(RIGHT([_this], LEN([_this]) - 1)) = MID([_this], 2, LEN([_this]) - 1)
)
Solved! Go to Solution.
The = operator is case-insensitive, meaning upper- and lower-case letters are seen as the same, so you can't use it to test whether a letter's case is suitable. The only way to do case-sensitive comparisons is to use FIND().
AND(
(LEN([_THIS]) >= 5),
(FIND([_THIS], (UPPER(LEFT([_THIS], 1)) & LOWER(RIGHT([_THIS], LEN([_THIS]) - 1)))) = 1)
)
Untested.
The = operator is case-insensitive, meaning upper- and lower-case letters are seen as the same, so you can't use it to test whether a letter's case is suitable. The only way to do case-sensitive comparisons is to use FIND().
AND(
(LEN([_THIS]) >= 5),
(FIND([_THIS], (UPPER(LEFT([_THIS], 1)) & LOWER(RIGHT([_THIS], LEN([_THIS]) - 1)))) = 1)
)
Untested.
Hello again, thank you, the formula works well when it is a new record, however if I want to modify an existing record, i aget this error (invalid entry)
Please post screenshots of the app screen with the error displayed, of the column configuration, and of the Valid if expression.
Sorry, the mistake was that I already had previously saved data and that's why I got an error when editing
Thank you very much
Thank you very much, it works, I just added the space validation
User | Count |
---|---|
23 | |
15 | |
4 | |
3 | |
3 |