Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

script to find and replace a string within text

Featured Replies

  • 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

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.

  • 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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.