Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5156 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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

This topic is 5156 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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