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.

Search and replace problems

Featured Replies

Hi to everyone,

I have a script that uses the funktion search/replace, and I am trying to use the skriptparameter for the search query. For some reason "get (skriptparameter)" does not work as a funktion for the search, maybe I'm using the wrong synthax?

Does anyone know how to solve my problem? I'm a bloody beginner when it comes to fmp, I'm sorry!

Thanks for your help

Sebastian

Here is a simple example from FM Help:

#This example uses the script parameter to set the title of the

report

Go to Layout ["Detailed Report"]

Perform Script ["Sort by Date"; Parameter: "Month End Report"]

Set Field [sales::Report Title; Get( ScriptParameter )]

Perform Script ["Print in Landscape"]

Similarly, for your case, you should be able to Go to a (Find) Layout, Enter Find Mode, and Set Field, using the ScriptParameter. If you could show us your actual script, perhaps we could help you.

"I have a script that uses the funktion search/replace"

That's your problem. Wrong function. This is causing a lot of hangups because people are not recognizing that there are TWO search functions and the one you chose is the first one of the two.

You selected the "word processor" type search/replace action. Look under the FOUND SETS group for the perform find[] action.

  • Author

Thanks for you Ideas,

I have a DB that keeps track of objekts that are stored in different boxes. There 100 positions (where the objekt could be) within one box. I have a graphical layout where a field represents a position within a box.

Now here is the problem: I want to be able search for an objekt, even if I don't know in which position(field) it is in.

I was trying these script steps:

Go to Layout [ "Search Position" ]

Search/Replace [ Get ( Scriptparameter ) ; "X" ; Replace ]

The Scriptparameter is the name of the objekt. I have the german version of FMP so I hope I translated everything correctly.

Thanks again for your help.

Sebastian

If you could have your one box as a repeating field with 100 repetitions, then all you would have to do is a find in the repeating field; FM will find what you want regardless of the repetition.

  • Author

cool... thank you so much... I tryed it and it works perfectly

I love this forum... I have found an answer to every question I have had so far!

Thank you

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.