Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7344 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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.

This topic is 7344 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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