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.

Very basic newb question

Featured Replies

First, big thanks to everyone on these boards. I didn't even know filemaker existed two weeks ago until I got this new job, but I've learned a lot from lurking....

Now for a possibly easy question, I searched to no avail... I have a report that I want to create for only one state. Is there a way that when the user clicks on the button to perform the script filemaker can prompt them for which state they want to do the report on? I'm sure I'm missing something here. Brain farts all morning....

You can have a Dialog Box popup and point to a global field under 'Input fields'.

However, an easier interface might be to have a srop down box with the states next to the button, or another layout that has a listing of all the states. When they click on the state, it will bring them to the report.

P.S. Keep in mind that drop down boxes are not available from the dialog box unless you use a plugin.

  • Author

Hmmm. Not sure I truly understand this and I've been doing a lot of research. Perhaps I need to find a book.

I decided to use your idea of a dropdown box to choose the state and a button. When I press the button it runs a script that does a find, but what I don't understand is how to tell filemaker that I only want the report to show records from a particular state, and this report will often be for different states. Is this where parameters come into play? I haven't really grasped the whole parameter idea. I know that I want to pass the state to the script as a parameter, but can't figure it out. Do I need to set up a field to store the parameter? Thanks again.

Edited by Guest

Levi777:

Welcome to the Forums.

To elaborate on John's suggestion, and on the work you've done: The dropdown box you're using should be a global field - that is, a text field with storage set to Global Storage. Then, in your script, you can use the global data to do your find in your actual state field. For the example, let's call your current table "yourDB", the global field "gState", and the state field (where your state data is stored) "tState". Your script would contain:

Enter Find Mode[]

Set Field[yourDB::tState; yourDB::gState]

Perform Find[]

So what you're doing is entering Find Mode, setting the field to be searched, then performing the find. After that you can go to the correct layout, etc.

Now, that's the old way to do it, before script parameters, but it still works fine, and is simplest to understand. Passing parameters can wait until next time.

-Stanley

  • Author

Enter Find Mode[]

Set Field[yourDB::tState; yourDB::gState]

Perform Find[]

Hey Stanley, thanks for your help. I know that this is very basic, but I'm still not able to get it to work. A script that would have took seconds to make in sql has pretty much drained me.

I now understand how it should work, but the second line set field - how do you enter two fields into it (tstate and gstate). I was only able to enter one. Sorry if this is frustrating for you guys, I'm trying...

The first parameter (before the semicolon) in the Set Field step is the target field. The second parameter (after the semicolon) is the calculation to enter.

  • Author

Wow, my bad... Thanks for straightening that out for me. My weekend will no longer be spent thinking about filemaker. Thanks all of you that helped out.

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.