Posts: 1,665
Threads: 644
Joined: Aug 2016
Reputation:
164
02-20-2018, 05:59 PM
(This post was last modified: 02-20-2018, 07:19 PM by rslemer.)
If I need standardisation, for example, name, last name, account name, always formatted with same way
Is better created a workflow with a function uppercase/lowercase or use a business map, with a regex?
Any perfomance impact or something like that?
Ranieri
eCRM Web
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
I'd say that the performance would be very similar but the user experience is very different. On one side, the BMap will validate the input and give the user direct feedback so he won't be surprised when the name is changed after he saves. Since the validation is done when he clicks the time is spent at that moment, not when the screen has blocked and he is waiting for all the work to be done. On the other side, the user will have to manually fix the name while the workflow does that work for you.
Joe
TSolucio
Posts: 1,665
Threads: 644
Joined: Aug 2016
Reputation:
164
02-20-2018, 06:58 PM
(This post was last modified: 02-20-2018, 07:18 PM by rslemer.)
Interesting point, but not exists a function to uppercase, or upwords, for use in BP, only if I create thru regex, right?
My question is, when I tried to do that, I see is not too easy, with regex ...
solve, for Brazilian names
<map>
<originmodule>
<originname>contacs</originname>
</originmodule>
<fields>
<field>
<fieldname>firstname</fieldname>
<validations>
<validation>
<rule>regex</rule>
<restrictions>
<restriction>''(?=^.{2,60}$)^[A-ZÀÁÂĖÈÉÊÌÍÒÓÔÕÙÚÛÇ][a-zàáâãèéêìíóôõùúç]+(?:[ ](?:das?|dos?|de|e|[A-Z][a-z]+))*$'</restriction>
</restrictions>
</validation>
</validations>
</field>
</fields>
</map>
Ranieri
eCRM Web
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
Correct, BMap can only validate not modify (yet....)
Nice!!
Joe
TSolucio
Posts: 1,665
Threads: 644
Joined: Aug 2016
Reputation:
164
this regex, valid first letters uppercase, but considering a brazilian names ... not transform, only check, ok?
Ranieri
eCRM Web
Posts: 3,564
Threads: 36
Joined: Apr 2014
Reputation:
49
yes, correct, validation maps do not transform, they only validate
Joe
TSolucio
Posts: 1,665
Threads: 644
Joined: Aug 2016
Reputation:
164
Description in wrong. This RegEx test with first letter is uppercase, and all words is a valid Brazilian name ( with length, number of words and characters
Ranieri
eCRM Web