Hi All,
I have a requirement, have to separate the string with a Hyphen(-) after every 4th character entered by the use, also it should not count space as string and should ignore it.
Discussion posts and replies are publicly visible
Hi Kumar,
You can create an expression rule with below code and use it:
with( local!insertIndex: 4, /*"Insert Hyphen after every 4th character in input."*/ if(isnull(ri!text), null, joinarray( char( insert( code( ri!text ), 45, /* To Insert Hyphen */ ( ( enumerate( quotient( len( ri!text ), local!insertIndex ) ) + 1 ) * local!insertIndex ) + 1 ) ) ) ) )