November 3, 200322 yr 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"]
November 3, 200322 yr Not easy to do, it requires quite a bit of hacking around (ie, a lot more than just a script). Ray (CobaltSky) has a demo on his web site. http://www.nightwing.com.au/FileMaker/
November 3, 200322 yr 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.
Create an account or sign in to comment