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.

User input for search

Featured Replies

  • Newbies

Hello. I am quite new to FM and am trying to create a script that asks for user input and then performs a search based on that input. From my experimentation I found that the Custom Dialog writes the data to the field you specify, so I...

Created a field in my DB called var1, wrote the user input to that field and did a search for where the fields match - but no joy.

Any ideas? I seems like it should be simple (well it is in Access).

thanks

Michael.

Hi Michael, Welcome to the Forums ;)

It is easy once you've got a grasp of how things work -- the learning curve is MUCH quicker than access.

Anyway, go in to define database (option + shift + d) Double click your var1 field, go to the storage tab, choose "Use global (one value for all records)" -- this field will now behave like an actual variable (session specific, accessible from anywhere in the file etc.)

Now for your script just use:

Set Field[ var1 ; "" ]

Show Custom Dialog[] -- with the field var1 specified as the input field

Enter Find Mode[]

Set Field[ The Field That Var1 Is Meant To Represent ; yourtable::var1 ]

Perform Find[]

  • Author
  • Newbies

Hi. Thanks for your prompt response. I have followed your instructions but it comes up now and says "No records match this set of find requests".

I have attached a copy of the script for your reference.

Many thanks

Michael.

Script.pdf

Set Field [ PEP Jobs::var1="" ]

Show Custom Dialog [ Title: "Facilitator"; Message: "Enter the name of the Facilitator for which you wish to run this report"; Buttons: “OK”; Input #1: PEP Jobs::var1, "Facilitator:" ]

Enter Find Mode [ ]

Set Field [ PEP Jobs::Facilitator = PEP Jobs::var1 ]

Perform Find [ ] // The search is performed here -- after this you will automatically be taken into browse mode

Please explain this layout jumping here and then we can work out what's going wrong -- what layout do you start on? Why are there two layouts involved?;)

Go to Layout [ “Job Summary” (PEP Jobs) ]

Pause/Resume Script [ Indefinitely ]

Go to Layout [ “PEP Jobs” (PEP Jobs) ]

Edited by Guest

  • Author
  • Newbies

Hi. Thanks for your continued help.

The layout that I start on is called "PEP Jobs" which is the main layout that we work from. The other layouts are various "reports". I have attached a copy of the file so you can have a look.

thanks

Michael.

Pep_Projects.fp7.zip

  • 3 weeks later...

Sorry i forgot about this post

Anywho, in the attached there is a script called "find facilitator" and a giant button that you can't miss. There's a few things i wouldn't usually put in there i.e. excessive dialogs but it shows you a few techniques you might use.

Pep_Projects.zip

  • Author
  • Newbies

Thank you very much for this. Works perfectly..

Glad i could help.

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.