Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7693 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello

I would like to find a way to script a bit of text to change color within a string. The 5th 6th and 7th characters of a string.

123456789 567 so I can make 567 ReD

is this possible

Thanks

Dave [color:"red"] [color:"red"]

Posted

Make 3 calculated fields:

cField1 = Left(inputField,4)

cField2 = Middle(inputField,5,3)

cField3 = Middle(inputField,8,64000)

Now make a merge text field:

<<cField1>><<cField2>><<cField3>>

Then format the colour for the "<<cField2>>" part as red (or bold or whatever you want). This is the general method I use when I need to have a single piece of text formatted differently within a larger block of text. So, the first calculated field holds the all the text preceding the highlighted text. The second calculated field holds the highlighted text, and the last field holds the trailing text. Then the merge field does the actual formatting automatically.

This topic is 7693 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.