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

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

Recommended Posts

Posted

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

Posted

What exactly does the Suppress Records script do?

Posted

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.

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

(Just testing the new Quote function...)

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

:blush:

This topic is 7071 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.