Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have a problem with searches I am running with a script

The database is one for airline contracts and the airfares within them...... certain data at contract level is manually entered but the basic fare data (departure, destination, class, price season etc) is allowed to be imported from spreadsheet.

I import it into a table where it is validated before being transferred to the main database. During the import from spreadsheet various criteria are checked by calculation and the value auto-entered in a set of marker fields (1 if ok, 0 if the data is invalid)

I then perform a number of search requests on the calculated marker fields, first to find any invalid fares due to faulty data in the departure city field, secondly to find invalid data in the departure zone field, then arrival cities, then arrival zones, seasons, class price etc

The object of these searches is to give the user the chance to check the fares by groups, by knowing which field is invalid in each group saves a lot of manual checking for errors in valid fields, and giving them the chance to correct or delete each invalid fare.

This all works fine if there is at least one invalid fare per data field.... what is frustrating me is that if the data in any one of the fields is all correct and there are no invalid fares returned the dialogue box with

"no records match this set of find reqests "

pops up with the options of cotinuing (the script) or modifying the find. I would dearly love to get rid of this message so that if no records are returned then the next script step automatically runs without pausing to ask the user about what to do.

it causes me double problems because I run the script twice.. it is called at the end of the import process and again when the user presses the button to save the fares to the main database and this means these infuriating messages keep popping up.

Does anyone know how to prevent the "no records match this set of find requests" dialogue from showing?

Posted

I have a problem with searches I am running with a script

The database is one for airline contracts and the airfares within them...... certain data at contract level is manually entered but the basic fare data (departure, destination, class, price season etc) is allowed to be imported from spreadsheet.

I import it into a table where it is validated before being transferred to the main database. During the import from spreadsheet various criteria are checked by calculation and the value auto-entered in a set of marker fields (1 if ok, 0 if the data is invalid)

I then perform a number of search requests on the calculated marker fields, first to find any invalid fares due to faulty data in the departure city field, secondly to find invalid data in the departure zone field, then arrival cities, then arrival zones, seasons, class price etc

The object of these searches is to give the user the chance to check the fares by groups, by knowing which field is invalid in each group saves a lot of manual checking for errors in valid fields, and giving them the chance to correct or delete each invalid fare.

This all works fine if there is at least one invalid fare per data field.... what is frustrating me is that if the data in any one of the fields is all correct and there are no invalid fares returned the dialogue box with

"no records match this set of find reqests "

pops up with the options of cotinuing (the script) or modifying the find. I would dearly love to get rid of this message so that if no records are returned then the next script step automatically runs without pausing to ask the user about what to do.

it causes me double problems because I run the script twice.. it is called at the end of the import process and again when the user presses the button to save the fares to the main database and this means these infuriating messages keep popping up.

Does anyone know how to prevent the "no records match this set of find requests" dialogue from showing?

Posted

I have a problem with searches I am running with a script

The database is one for airline contracts and the airfares within them...... certain data at contract level is manually entered but the basic fare data (departure, destination, class, price season etc) is allowed to be imported from spreadsheet.

I import it into a table where it is validated before being transferred to the main database. During the import from spreadsheet various criteria are checked by calculation and the value auto-entered in a set of marker fields (1 if ok, 0 if the data is invalid)

I then perform a number of search requests on the calculated marker fields, first to find any invalid fares due to faulty data in the departure city field, secondly to find invalid data in the departure zone field, then arrival cities, then arrival zones, seasons, class price etc

The object of these searches is to give the user the chance to check the fares by groups, by knowing which field is invalid in each group saves a lot of manual checking for errors in valid fields, and giving them the chance to correct or delete each invalid fare.

This all works fine if there is at least one invalid fare per data field.... what is frustrating me is that if the data in any one of the fields is all correct and there are no invalid fares returned the dialogue box with

"no records match this set of find reqests "

pops up with the options of cotinuing (the script) or modifying the find. I would dearly love to get rid of this message so that if no records are returned then the next script step automatically runs without pausing to ask the user about what to do.

it causes me double problems because I run the script twice.. it is called at the end of the import process and again when the user presses the button to save the fares to the main database and this means these infuriating messages keep popping up.

Does anyone know how to prevent the "no records match this set of find requests" dialogue from showing?

Posted

First, you tell FMP not to trap for errors itself but to let you do the trapping with the Set Error Capture [on] script step. This will suppress the alerts. It will also cause the script to continue onwards regardless of an error, so you have to program coditionally to allow for it. In the script sample below, gError is a global number field used to store the error code generated by the find.

Enter Find Mode []

<stuff to generate find requests>

Set Error Capture [on]

Perform Find []

Set Field [gError, Get(LastError)]

Set Error Capture [off]

If[ gError = 0 ]

<stuff when records are found>

Else

If [ gError = 401 ]

<stuff when no records found>

Else

<stuff when some other error occurs>

End If

End If

Posted

First, you tell FMP not to trap for errors itself but to let you do the trapping with the Set Error Capture [on] script step. This will suppress the alerts. It will also cause the script to continue onwards regardless of an error, so you have to program coditionally to allow for it. In the script sample below, gError is a global number field used to store the error code generated by the find.

Enter Find Mode []

<stuff to generate find requests>

Set Error Capture [on]

Perform Find []

Set Field [gError, Get(LastError)]

Set Error Capture [off]

If[ gError = 0 ]

<stuff when records are found>

Else

If [ gError = 401 ]

<stuff when no records found>

Else

<stuff when some other error occurs>

End If

End If

Posted

First, you tell FMP not to trap for errors itself but to let you do the trapping with the Set Error Capture [on] script step. This will suppress the alerts. It will also cause the script to continue onwards regardless of an error, so you have to program coditionally to allow for it. In the script sample below, gError is a global number field used to store the error code generated by the find.

Enter Find Mode []

<stuff to generate find requests>

Set Error Capture [on]

Perform Find []

Set Field [gError, Get(LastError)]

Set Error Capture [off]

If[ gError = 0 ]

<stuff when records are found>

Else

If [ gError = 401 ]

<stuff when no records found>

Else

<stuff when some other error occurs>

End If

End If

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