#4523 - Help Limit Characters
We need to enforce the following, can you help and advise on how to enter into the module? Any number Any upper or lowercase letter (no accent) Any of these characters - &#*,
We need to enforce the following, can you help and advise on how to enter into the module? Any number Any upper or lowercase letter (no accent) Any of these characters - &#*,
3 years ago
Hi djohnson,
The character patterns are listed in the doc, page 6 to 8. (you can download it directly from the Doc tab, in english or french).
Here are your answers: - use 9 to replace any number - use a to replace any letter without accent - add any special character to your mask to force its entry at that position.
The example page 7 shows how it is done for +, ( and ).
Let us know if it doesn't work, and in that case give us details: - the mask you tried, - some examples of values you can not enter with this mask, - the module and field on which you tried it. (a studio screenshot is great to let us know about field type, dependencies, formula, etc.),
Best Regards, Laurent, Synolia Support Team
3 years ago
Hi Thanks for the reply. I still need more help please. 1. I want to force only numbers in a field. However, the number of digits can vary. How do I accomplish that with the 9? 2. I want to force only letters in a field. However, the number of letters can vary. They can be either upper or lower case. How do I accomplish that with the a? 3. I want to force only these options in a single field, how do I do that? numebers (9), letters (a), or any of these symbols - &#*,
3 years ago
Hi,
The good news is that you will be able to do that very soon. A regex mode has been implemented for the v8 to v11.0 package. This mode is great to manage masks which can take a various number of characters, or which should follow more complex rules.
The package was already tested by 2 people here, and one of them tried it successfully on your use cases. I am getting back to you as soon as the package is available for download.
3 years ago
Hi again,
You can now download the new package SUGAR_SYNOFIELDMASK_8-to-11.0_202104181134.zip.
Here are the masks that should answer your needs: 1. Regex=[0-9]* 2. Regex=[a-zA-Z]* 3. Regex=[a-zA-Z&#-]
Best regards, Laurent, Synolia Support Team
3 years ago
3 years ago
And now it's 3 and not 1, I wonder if there might be an autocorrect feature.
3 years ago
Hi Laurent, Thanks for the quick help! Unfortunately, I encountered errors when uploading the package and have attached a picutre here. DJ
3 years ago
3 years ago
Sorry to read that. I could install the package on a DemoBuilder instance just now: SugarCRM Version 10.3.0 (Build 222 E) (Q1 2021) We will have to dive deeper into it. I will switch to direct mail as it will make it easier to get files (logs, etc.).
3 years ago
To sum it up there was a conflict with some custom code on that SugarCRM instance. We fixed the package so that it would not happen again.
3 years ago
Thanks for the great service in getting this taken care of. We love the new features. Please consider this case closed!