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.

Featured Replies

I am a beginner ---please forgive an elementary question.

I've got an fmp 11 file with 1,950 people who were members of a college at various times between 1437 and 1960. I want users to be able to get a report on who was a member

in a user-selected year: call it $QYear. Then there's a find (each member's YearIn should be before $Qyear, and his YearOut should be after it) and various other little jobs.

How can I let the user set the $QYear? I've read the manual; I've read the last 6 months' of this forum. I've got a custom dialogue, ("Enter the year"), but I can't see how to pass the answer there to assign it to $QYear in the Find procedure.

All help for a tyro gratefully received.

The custom dialog requires that you use a database field when asking for data from the user.

In your situation you would probably want to use a "global field". That is a field which you have configured in its "Options..." to have "Use global storage" checked under the Storage tab.

After the data is entered via the dialog, use Set Variable[] to assign the script variable to the value of the global field.

  • Author

Many thanks. I'll try it this afternoon: am grateful for the

hints.

  • Author

I am grateful to Tominator, and have followed his advice (and stuff in the Knowledge Base).

I've added a field to my main table, and called it QYear. I have the user populate this through a dialogue: each record gets the year "1660" or whatever: it really does fill all 1,950 records with QYear. It is a global field.

The next stage is to implement a find:

$$QYear <= YearIn AND $$QYear >=YearOut

should produce a list of all those people who were In in QYear.

Problem: when I try to construct the criteria the field QYear is greyed out, and unobtainable, even though the field is populated in the Table.

Why should that be? How do I get QYear into the Find Request?

I learn a lot with your help: thanks.

After the data is entered via the dialog, use Set Variable[] to assign the script variable to the value of the global field.

You have coincidentally named your global script variable $$QYear the same as the global field QYear. They are independent of one another. The QYear global field is needed solely to collect information from the user in the dialog because FileMaker doesn't (yet) allow you to collect info into a script variable directly.

SetVariable[$$QYear; YourTableName::QYear]

to copy the data from the global field into your global script variable.

Then you can use the $$QYear value when constructing your Find request.

How do I get QYear into the Find Request?

Try:

Enter Find Mode []

Set Field [YearIn ; "≤" & QYear ]

Set Field [YearOut ; "≥" & QYear ]

Perform Find []

  • Author

Thanks to Tominator and to Comment. It works now.

And I've got a model for other user-input finds.

I hope not to be back, but your helpfulness will encourage me after say a day's fruitless struggle in the future.

jdjd

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.