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.

find causes script

Featured Replies

I want to perform a find and if the result of the find is "no records found", then have the program ask a question "Do you want to do another find?" and have the option of picking "yes" or "no" for the answer and depending on the answer perform a script. Is this possible?

Use a script like:

Set Error Capture [On]

# do you find stuff here

If [status(CurrentFoundCount) = 0]

. Show Message [sorry, didn't find anything. Do you want to do another find?] [Yes] [No]

. If [status(CurrentMessageChoice) = 1]

.. # do the stuff here if they do want another find

. Else

.. # do the stuff here if they don't want another find

. End If

Else

. # do what you want with the records which were found

End If

You could do this with a script:

set error capture on

loop

enter find mode

pause

perform find

if [status(currenterror)<>0]

show message "No records found, would you like to perform another find? (button1 ="yes", button2="No")

if [status(currentmessagechoice)=2]

exit loop]

end if

else

exit loop

end if

end loop

enter browse mode

syntax might be a bit off, but it is the basic idea.

HTH

-Raz

Hi Dobbers,

This question comes up very often, and always get the same answer. Let me make another suggestion.

1.Find or Relationship ?

When you program a scripted find, there are great chances that this find could be replaced by a single relationship validation, which is [quicker .

ex : check for invoices dues for the customer.

a global field = 1 in the Customer file

a concanate calc field = Customer_Id & " "&global

a calc c_invoicedues = Case(InvoicePaid = "Yes", 0, 1)

a concanate calc field in Invoices db = Customer_Id & " "&c_invoicedues

Relationship ----> LookToInvoiceDues = Customer:Concanate::Invoices:Concanate

Then the classic "do some stuff and perform find" could be changed to B)

If not Valid(LookToInvoiceDues)

Show Message....

2. The Message and the script(s) to trigger depending on the result of the find/relationship :

There are currently 3 maximum choices (I may be wrong) in a Show Message Dialog Box. So instead of using the "Yes" or "No", you could have a Message :

"There are currently no records matching your request"

Choices :

1. Abort

2. Perform Script 2

3. Perform Script 3

which allows you to trigger 2 different scripts.

or switch from the Show Message Script step to a smoother solution involving either :

- A layout for messages with as many scripts as you want to trigger

- A message appearing within the user interface according to the result of the script.

Of course, both solution proposed by Raz and Russ are working fine for classic finds....

  • Author

Thanks guys I appreciate all your answers.

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.