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

Featured Replies

Hello,

I have two separated files in FMP 7.

In the first one, called "results", a set of 20 records are created, with two basic text fields ??? sample_nr and result. The results are empty, and the sample nrs are identical.

In the second one, called "encoding", one record is created with the sample nr and 20 fields. These 20 fields collect or calculated a maximum of 20 results. When it is done, a script updates each result in each record of the first field. It works well.

My problem is when less than 20 results are generated : the result field of some records in the first file remains logically empty, and I have to suppress them. To do so, I start a script in the second file, "encoding". It performs the following steps :

-the update of the result fields

-copy the sample number

-start a script in the first file, "results"

This last script performs the following steps :

-search mode

-paste the sample_nr

-result =

-perform search

-suppress records

The search step works well, but the script doesn't suppress the records. When I manually copy the sample_nr and perform the script directly in the first file, it works perfectly and suppress the records as expected. confused.gif

I tried several alternative solutions : to suppress by a loop, to change the sample_nr, etc., but without any more success.

Something wrong in the script steps ? The files are shared by FM Server and all runs with W2000. FMP7v3.

Many thank in advance for your help

Christian

What exactly does the Suppress Records script do?

Could be he means "constrain found set". In that case the script should be

- perform find

- contstrain

The constrain command should be in the find request.

  • Author

Sorry for the translation (my version of FMP is in French). It should delete the found set of records. Presently, it does nothing.

Christian

Hi Christian,

This is just a wild guess, but Suppress sounds more like you would be Omitting "1" Record, and not Deleting "1" Record . The English step is "Delete All Records", and not just "Delete".

HTH

Lee

  • Author

OK Lee! It should really delete all the found records, then the script step is well "delete all records".

Thanks

Christian

Do you have FileMaker Developer? If so, step through the script with the debugger on and see if your script actually produces a found set in the 2nd file.

  • Author

Hi Wim

No, I haven't FM Dev. But I am sure that the records are well found, as expected. Only the last step, to delete the found set of records, doesn't work if the script is started from the other file. If it is started IN the file, the script works perfectly and the found set is deleted.

Christian

Huh?

What other file?

I think that you may have to have two scripts then.

Maybe you describe in more detail the file setup.

Lee cool.gif

  • Author

OK, I describe shortly, without too much details :

2 files, not linked.

In the file_1, 20 records with two fields : reference and data (text fields).

In the file_2, 1 record with 21 fields : reference and data_1 to data_20 (text).

In this file_2, when some of the data_x fields have data, a script starts to update each record in file_1, copy the reference and start a second script in file_1. This second script do the following steps :

-Search mode

-paste reference

-data = (empty)

-Perform search

-delete all records

This last step doesn't work. But if I manually copy the reference in file_2 and start the second script in file_1, it works perfectly and the records are deleted as expected. The records to find are always found as expected in any case.

The two files are shared on a server with FM Server. Windows 2000. FMP 7v3.

Christian

I don't know the answer to your problem - but in general having fields like data_1 to data_20 is an extremely strong indicator of a serious design problem. You need to set up a proper relational structure.

Now you have added another variable,

The two files are shared on a server with FM Server. Windows 2000. FMP 7v3.

Your new explanation doesn't help much. It sounds like you need a "Set Field" script step and are using a copy past or something. Without the files, I can't be sure what you have.

What language version of FileMaker are you using?

Lee

  • Author

Lee,

Version 7v3.

Christian

Not version, language. I.e. English, French, German, etc. :crazy:

Sorry for the translation (my version of FMP is in French).

Christian

(Just testing the new Quote function...)

(Just testing the new Quote function...)

Works well, too bad my memory doesn't work that good.

:blush:

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.