Solved

continue a script if a find is empty

Posted on 2004-08-31
8
290 Views
Last Modified: 2010-04-27
is there a way to force a script to continue running after having an empty find? the scenerio is:

i have 4 databases
i have a layout that includes fields from each database
i have a field named selected record in each of the 4 databases
i do a search on each database and mark the selected record field with a 1
i do a find on each database for records with selected records = 1
the script runs fine and returns my desired results if there is at least one record in each database.
however if the find returns empty i get a "modify find or cancel" box.
when i hit cancel the script stops running.
0
Comment
Question by:kauakea
  • 4
  • 3
8 Comments
 
LVL 9

Expert Comment

by:prifre
ID: 11957169
Yes, and it is fairly easy. You set manual error handling=on.
You can do that just before the searching and reset afterwards.

It practically means you dont get the dialogs and have to check for >0 found records yourself.

I dont have an english version, so I am uncertain about how the script in english.

with a smile
/prifre
0
 

Author Comment

by:kauakea
ID: 11957397
the purpose of the script is to find all the records with selected records = 1 in all the databases and include them on a layout that i can run a report on.
what does check for >0 found records mean?
0
 
LVL 9

Assisted Solution

by:prifre
prifre earned 400 total points
ID: 11958105
Hi,

Manual errorhandling->On
#use the below two if you know what to search for (as for example "Selected record" = "1")
Find[]
Set Field ("Selected record","1")

Preform Find[]
If (Get(TotalNumberofRecords)>0)
   #preform whatever is to be handled if you fond the records
   #for example replace all field contents of Selected record with 1...
    Replace (No dialog, Selected record,1)
Else
   #preform whatever to do if you did not find any records
End If
Manual errorhandling->Off

(The above is how I would write the script... but it is what I guess it is, since I run a Swedish FileMaker and I have translated from swedish to English... So I might have misspellt.)

anyhow - hope the above helps!

with a smile
/prifre
0
 

Author Comment

by:kauakea
ID: 11958486
the if statement would work for <1 because if it finds a record a have no problem, but what i want it to do if no records are found is continue the script and the find operations.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 9

Expert Comment

by:prifre
ID: 11958824
the script says:
if we find some records, we do one thing, but if we find no records, we do a second thing.
What you actually do is up to you!

you write: "if no records are found is continue the script and the find operations. "
Does that mean you want the user to be back into find-mode and change the search criteria?
Then add "Enter Find" and "Exit Script" after "Else" in the script!

The point is with Manual errorhandling and checking Get(TotalNumberOfRecords)=0 you can yourself control what should happen if no records are found or more than 0 records are found etc. Scriptwise.

with a smile
/prifre
0
 

Author Comment

by:kauakea
ID: 11959017
the result i am trying to get is to run the script without any user intervention. i would like the script to continue even if one of the databases returns no finds on the marked selection = 1 from the find request
0
 
LVL 28

Accepted Solution

by:
lesouef earned 100 total points
ID: 11970767
so just remove the else condition....
but I think
if (Get(TotalNumberofRecords)>0) is wrong, he probably meant
if (Get(FoundRecords)>0)
otherwise it does not make sense to do this after a find

0
 
LVL 9

Expert Comment

by:prifre
ID: 11976630
Hi,

lesouef is quite correct. I mixed up Get(TotalNumberRecords) and Get(FoundRecords).
/prifre
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now