Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Hi,
I am trying to use Validation logic, but it is not working as expected. Here is my logic condition - User can write '2 Alpha' and '7 digit' hence in total it should be 9 without spaces.
I used this condition -
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
Thanks for trying.
To make sure I understand your case correctly, your original problem was that you wanted the field value to have 9 characters, right? The formula you have right now is saying if the field's length is 9 characters, show the error message. Hence, if you type anything expect 9 length words, you will not see the error. If the use case is to allow words with the length of 9, and to not allow everything else, you need to revert the equation sign.
IF(LEN({DE:Global | Global marketing campaign id}) != 9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)")
Thanks for reaching out.
Could you please retry with double equation signs?
IF(LEN({DE:Global | Global marketing campaign id}) == 9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)")
Zugriffe
Antworten
Likes gesamt
Thanks for reverting back.
This still not working, I applied a rule not to extend more than 9 words, the error message doesn't come up if I extend the limit. Here is the screenshot.
Zugriffe
Antworten
Likes gesamt
Thanks for trying.
To make sure I understand your case correctly, your original problem was that you wanted the field value to have 9 characters, right? The formula you have right now is saying if the field's length is 9 characters, show the error message. Hence, if you type anything expect 9 length words, you will not see the error. If the use case is to allow words with the length of 9, and to not allow everything else, you need to revert the equation sign.
IF(LEN({DE:Global | Global marketing campaign id}) != 9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)")
Thank you soo much, this one is working. One more question here, can we also convert this code to allow users to type only 2 Alphabets and only 7 numeric digits not more or less than this condition.
Regards,
Diksha g.
Zugriffe
Antworten
Likes gesamt
The following expression should do it
IF(LEN({DE:Global | Global marketing campaign id}) != 9,"Please write '2 Alpha' '7 digit' and 'in total it should be 9' without spaces (eg-tmtpredict)",
IF(CONTAINS(0, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(1, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(2, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(3, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(4, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(5, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(6, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(7, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(8, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(CONTAINS(9, LEFT({DE:Global | Global marketing campaign id}, 2)), "Please start with '2 Alpha' without spaces (e.g.-ab)",
IF(LEN(NUMBER(SUBSTR({DE:Global | Global marketing campaign id}, 2))) != 7,"Please end with '7 digit' without spaces (e.g.-1234567)"
))))))))))))
Thank you soo much, it's working fine. 🙂
Regards,
Diksha G.
Zugriffe
Antworten
Likes gesamt
Hello @hnalbandyan could you please suggest how do I set up Validation Logic on a Text field for the Business Code to start with 2 Numbers followed by dash (XX-) only, otherwise Error?
Copilot is giving me REGEXP specific code only.
Thank you in advance.
Zugriffe
Antworten
Likes gesamt
One thing that often trips folks up is that validation logic does not work at all in Preview. In order to see your rule work, you have to save your changes and go find that form on a live record.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten