How To Identify A Carriage Return In A Db Field Type Paragraph Follow

0
Avatar
Legacy Poster

Hi everyone,

 

I trying to do a validation with a DB fields (paragraph type), the thing is that I need to identify a carriage return and set the first letter as capital.

 

For example, field comes in this way:

 

Cotton/Linen Mini Stripe

envelope Pillowcase Set

 

I need it:

 

Cotton/Linen Mini Stripe

Envelope Pillowcase Set

 

Can someone help or guide me about how to do this?

 

Thanks in advance

 

1 comments

0
Avatar
Shotaro Ito
Comment actions Permalink

Hi,

You can modify data source value by Transform's VB script.

Carriage return is represented by vbCr in VB script.

 

On the multi line text > Property > Data soruce > Transforms > VB Script > OnProcessData Event, place the script below.

 

dim aryStr
buf=""
aryStr = Split(Value,vbCr)
For Each str in aryStr
  buf = buf & vbCr & UCase(Left(str,1)) & Mid(str,2)
Next
Value = Mid(buf,2)

 

[attachment=1034:changeToUpperCase.png]

 

Tried in Search and Replace transform - but couldn't get a nice result.

Please sign in to leave a comment.