Jump 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.

Perform Text Search/Replace Question

Featured Replies

  • Newbies

Is it possible to do a text search & replace

within a given FMP field? Any help would be appreciated!

quote:

Originally posted by tripmonk:

Is it possible to do a text search & replace

within a given FMP field? Any help would be appreciated!

You would need to do the scripting of the functionality your self.

You could have a script that performs a search, then does a calculated replace on those records that replaces the specified words.

At least 2 user input fields (search word, replace word) would be needed and you would need to write this script for each field you wanted to do this on, as variable field names are not allowed in FMP.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

  • 2 weeks later...

I have never done this, but it might no be too hard if you had a global field to hold the search string, used a generic script that ran on whatever the currently selected field was, using the Paste Result script step in combination with the Subs() function to do the replacement (but it would effectively be a "replace all" operation with no undo -- another global field and script step could provide the ability to undo though.

Thinking about it a bit more, there may be a need for individual scripts tailored to each text field.

quote:

Originally posted by Vaughan:

I have never done this, but it might no be too hard if you had a global field to hold the search string, used a generic script that ran on whatever the currently selected field was, using the Paste Result script step in combination with the Subs() function to do the replacement (but it would effectively be a "replace all" operation with no undo -- another global field and script step could provide the ability to undo though.

Thinking about it a bit more, there may be a need for individual scripts tailored to each text field.

"OOPS, I didn't mean to overwrite the customer numbers, I just wanted to replace the zip codes." or some such variation will be the enivitable result of doing this kind of operation on the current field. Very dangerous.

Scripting it is both easier and safer, plus it puts the control of program functionality in the hands of the programmer and not the user.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

Create an account or sign in to comment

Important Information

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

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.