Jump to content

Can't get search criteria out of a date field. Aarrgh!


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

Recommended Posts

I have a sales summary report that is used in the following manner:

In Browse mode they click on a button in the header labeled "Specify Search Criteria". This causes a script to run that puts them in Find mode and pauses. At this point the user can enter their search criteria for every field in the body of the report by selecting values off of pop-up lists attached to each field. I want this search criteria to be disaplyed in the header of the report when the report gets rendered so.......when the user clicks "Continue", the script copies this search criteria from these fields into a set of global fields displayed in the header using the Set command. Example:

Set (Sales Summary Item Name, Item Name)

Set (Sales Summary Item Category, Item Category)

Etc.

Then the script executes a "Perform Find" command. The report renders with the correct records in the found set and the global fields in the header displaying the search criteria that were specified - very nice.

There's one major problem though that's driving me crazy: One of the search fields in the body of my report is a date field: Item Date. While in find mode the user can enter a date into this field, continue the script, and everything works just fine i.e. the correct records are found AND the date appears in my global header field: Sales Summary Item Date. However, if the user uses any SPECIAL SEARCH CHARACTERS when they enter their date into the search field (such as >11/20/2000 or 11/01/2000...12/01/2000) nothing gets copied into the corresponding global field in my header. The report renders the correct found set but the global date field in the header is left blank. It appears that the Set command for this global field is not doing its job:

Set (Sales Summary Item Date, Item Date)

How the heck can I get the Item Date's search string into the global in my header?

I tried Copy/Paste but that doesn't work wither - Filemaker won't let you Paste into header fields.

Thanks for reading all of this. Hope someone can help.

-Charper

Link to comment
Share on other sites

Instead of using Set Field, use Insert Calculated Result and make sure that the field is on the layout when the script is at that step. This should solve your problem.

Chuck

Link to comment
Share on other sites

In FMP 4.x it's the "Paste Result" script command. It does exactly the same thing though.

------------------

Vaughan Bromfield

Sydney, Australia

Send replies and questions to the forum, not to me.

Link to comment
Share on other sites

This topic is 7843 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
 Share

×
×
  • Create New...

Important Information

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