February 20, 200520 yr Newbies Hello Filemakers, I am using Filemaker 7 and would like to create a script or a calculation that would enable me to find a string within a field containing large amounts of text and then, after it's been found, replace it within the text with a different color. It's important for me that the changes done within the text remain permanent. Could anyone suggest me the easiest way how to do that. Thank you
February 20, 200520 yr You can use a calculation like this: Substitute ( TextField ; SearchText ; TextColor ( SearchText ; RGB ( 255 ; 0 ; 0 ) ) ) It will change every occurrence of SearchText in the text TextField to red.
February 20, 200520 yr Author Newbies Thanks a lot! It works. The users of my database will actually need to find and replace six elements within a text field (it is an amino acid sequence of a protein). I have added an additional field for choosing SearchText string and created a button with a script that includes your calculation. The SearchText field has an assigned value list that shows up as a pop-up list with six element to find and replace. So now all my users and I have to do is just to chose the element from pop-up list, click the button and it's all done. Turned out to be so easy. Let me know if any of you guys want me to post the script. Thank you very much!
Create an account or sign in to comment