Jump 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.
Juggernaut

No criteria entered in find field, rtn all records

Featured Replies

Hello...I have created a script using a Search Data field which is an entry field on its own layout (Search Form) to search for criteria in multiple fields in another (Entry Form) layout in my database. I've anticipated and scripted for most scenarios and everything is working well except, when user hits continue when nothing been entered into the Search Date field, it returns all records.

I'd like to I Set Error Capture [on] with a message that says "you haven't entered anything" and have it go back to the Search Data field, but anything I've tried isn't working properly.

When Set Error Capture is [off] and modify find is chosen, the script moves onto the Entry Form without allowing the user to enter the modified criteria in the Search Form.

I've attached a pdf of my script to date, I'd appreciate any help in figuring out this last bit.

Thanks

Storage Locator.pdf

Change Set Error Capture to [On] and add this after the Enter Find Mode [Pause]???

Loop

Exit Loop If [Length( Search Data )]

Show Message ["You haven't entered anything."]

Go to Field [search Data]

Pause/Resume Script [indefinitely]

End Loop

After the test for whether records were not found and the user wants to try again, put

Perform Script [subscripts, Find Everywhere]

Exit Script

instead of the redundant Else steps.

You don't need to show all records or enter browse mode at the beginning, by the way.

Here's another option:

Set Error Capture [ On ]

If [ _FB = "Cancel" ]

Set Field [ _FB, "Find" ]

Enter Browse Mode

Perform Script [ "ToggleView" ]

Halt Script

End If

Set Field [ _FB, "Cancel" ]

Toggle Status Area [ Show ]

Enter Find Mode

[ Pause ]

Perform Find

If [ Status( CurrentError) = 400 ]

Beep

Show Message [ Buttons: "Cancel", "Try Again", ""; Data: "You did not specify any find criteria." ]

If [ Status( CurrentMessageChoice) = 2 ]

Set Field [ _FB, "Find" ]

Perform Script [ "FindMode" ]

End If

Else

If [ Status( CurrentFoundCount) = 0 ]

Beep

Show Message [ Buttons: "Cancel", "Try Again", ""; Data: "No requests found that meet your find criteria" ]

If [ Status( CurrentMessageChoice) = 2 ]

Set Field [ _FB, "Find" ]

Perform Script [ "FindMode" ]

Else

End If

End If

End If

Set Field [ _FB, "Find" ]

Enter Browse Mode

Perform Script [ "ToggleView" ]

"_FB" is a global field that is used for the "find" button label.

The "ToggleView" script shows/hides the status area.

Create an account or sign in to comment

Important Information

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

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.