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.

How to search on user input from dialog boxes?

Featured Replies

Hello,

 

I would like to improve my database by having a script that will search within a specific field for records that match data entered by the user in a dialog box. Most of them will be date related, e.g. search on "8/2012." I have found a lot of material on this question, but much of the advice makes assumptions the user has a higher level of knowledge than I do. I need an explicit answer. I do make buttons and write some simple script for them, that is my level. 

 

1- User clicks on button, starts script. (I have that figured out, it's after this I need help with.)

2- Dialog box opens and asks "Enter month to search on, e.g. 8/2012."

3- Find request is performed on that month and year. 

 

The rest, like jumping to the right layout and printing, I can do. It's step 2 and 3 I've been fooling around with for too long. Thank you.

  • Author

I fooled around a bit with this and I had the result that, say searching on "2/2012" it found 14 records, then when I did it again it found only 13 records, then 12, then it found frustration!

Here's one way to look at it. Note that this is far from perfect: you should turn error capture on when performing the find, and handle any errors yourself.

Search.fp7.zip

  • Author

That is the ideal answer for me, thanks a million.

  • Author

Hmm... odd. I pasted your script to my DB, and altered Show Custom Dialog input field #1 to point to the field I need, "Date Billed" and when I run it I get "The provided find criteria is not valid...." which is strange. The very same search on yours works, "8/2012" etc. but on mine I get that error. I tried it in FM 9 and 12, same result. 

Could you post your file? Preferably a copy with everything but the Date Billed field deleted.

  • Author

 I fooled around with the options on Enter Find mode and Perform find, using seemingly the correct programming as supplied so kindly by yourself, but now it will only pull up records from 8/2012!

 

The attached file is a DB from a larger job I did, and for this side work I do I quickly adopted from that the attached DB, so there is waste in it; however, if when you look at the tables of fields, "Cases" is the only relevant one for my question. Also, the relevant fields I have beginning with the letter "a" so they appear at the top of the field table. Obviously, I wrote this for my own purposes only. 

 

My question revolves around the Invoice Date, and searching for it by month. I have included a button above the invoice date which will run the search script, which I have tried to implement this simple thing correctly, but I have failed. I am sure the answer is laughably simple. 

 

Once I have this conquered, I plan on using the same technique on my main, and much larger DB.

  • Author

The system says I can't upload "that kind of file." 

  • Author

I figured it out. Thanks again. 

The system says I can't upload "that kind of file." 

If you follow the steps below, you will not have this problem in the future.

 

Step 1

Find the file on your hard drive, and zip it.

Step 2

Do not use the Quick Reply, BUT instead, choose the More Reply Option 

Step 3

Click on Attached Files and this will take you to your hard drive to locate your file, that you want to attach, and that you have zipped. Select the file, and then click Attach This File, and then click Add Reply.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.