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

Bypass no record found

Featured Replies

I run a script, that automate one of my daily processes.

It executes a find, and perform something if there is a found set, or does not perform anything if nothing is found.

The problem arise when no records are found. First, 9i get a message box to notify me

1) is there a way to bypass this message

The only way i found to count how many records were found was to execute a loop through the found set, and add 1 to a global field for each record going through the loop. However, if i find 0 records, the loop will still run 1 time and set my global field to 1.

2) any way i can use a function like foundCount, or check how many results were found?

here are my scripts:

go to record requets page[first]

Loop

copy[select,"Body#"]

Perform Script[subscript.....]

<<this is the subscript>>

set field global,0

enter find mode

paste[select,No style,"Body#"]

Perform Find[]

Enter Browse mode[]

Go to record request page [First]

Loop

set field[global,global+1]

go to record request [exit after last, Next]

End Loop

if [XXXX::global>0]

set field body#, "Body#&"-Revision"&XXXX::global"]

end if

go to record request page [exit after last, Next]

end loop

David

  • Author

I guess i'll use cuurent error, to find a 401.

  • Author

I solved the global count, but i still can't bypass the error message saying that no records were found.

Order a copy of Rich Coulkombre's book--Special Edition Using FileMAker Pro 5 from Amazon.

Set Error Capture-->ON will supress dialog

StatusCurrentFoundCount-->tells how may records were found

HTH

Old Advance Man

  • Author

ok,I will.

Thanks

David

David,

At the start of your script insert the step SetErrorCapture [On]

After the Perform Find[] step

code:


If Status CurrentError = 401

(do the bits you want if no records were found

might include a ShowMessage step to let the user

know that no records were found. You may need to

Exit the script here as well)

Else

SetField[Global,Status(CurrentFoundCount)

EndIf

BTW, I hope you have "[]" after your EnterFindMode step.

Russ

[ April 03, 2002, 05:07 PM: Message edited by: Russell Baker ]

shocked.gif Jeez, I'm frantically scouring my recent posts, and other forums, because, "I know I answered this, where is my post?" Aha! David asked the exact same question on the [email protected] mailing list. Never mind.

Don't use DtatusCurrentError=401.

use StatusFoundCount=0

HTH

Old Advance Man

quote:

Originally posted by Old Advance Man:

Don't use StatusCurrentError=401.

While I usually use the Status ( CurrentFoundCount ) = 0 test, is there some issue with the Status ( CurrentError ) = 401 that causes you to recommend the other method? Or is there some cases where the returned set of 0, but 401 is not generated?

quote:

Originally posted by CaptKurt:

quote:

Originally posted by Old Advance Man:

Don't use StatusCurrentError=401.

While I usually use the Status ( CurrentFoundCount ) = 0 test, is there some issue with the Status ( CurrentError ) = 401 that causes you to recommend the other method? Or is there some cases where the returned set of 0, but 401 is not generated?


Just in case you've put some comments before testing for error ,because it would reset current error to 0 crazy.gif

HTH

Dj

Another plus to using the Status(CurrentFoundCount) and similar items rather than Error Numbers is that you don't have to remember (or keep a list of) what error number means what. It's as much a mindset as a specific answer.

I like simple solutions, I do.

Paydate_Schedule.zip

Paydate_Schedule.zip

Paydate_Schedule.zip

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.