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.

Generating report from dates in 2 fields

Featured Replies

Hi,

Has any tried to do a report where they have a form the user enters a start date and a end date from two different fields and create a report based upon the range of information? I am having a time trying to figure out the scripting. I know that if you use one field you could enter for example: 5/1/05...5/31/05 and that will give you the range of dates for the month. Now I want to use two different fields (defined as globals of course!) to get the same report where the user just enters the dates and their criteria selection.

Thanks!

Chris

You could use the two date fields in a range relationship to pull up the records in that range or you can assemble the dates into a string for a find.

Which method are you trying and what kind of trouble are you having?

  • Author

What I have is a layout for the user to enter a "Start Date" and a "End Date". Both fields are defined as a global. The user has a field where they can select the "procedure" they wish to report on. Once all the fields are entered, they will click a button that performs this calculation and displays the total number of procedures they have selected.

I would prefer to use a string but how would I define it so that I can pull the values from the two date fields?

Try a script like this:

Enter Find Mode[]

Set Field [ DateField ; Start Date & "..." & End Date ]

Perform Find[]

Hi Mike,

Wow. What a change over previous versions.

I like it.

I notice that it inserts the "File" name Set Field, and the Calculation too. It looks like FM creates a Self-Relationship. Or did I do something wrong?

Enter Find Mode[]

Set Field [ DateFinds::Service_Date; DateFinds::g_StartDate & "..." & DateFinds::g_EndDate ]

Perform Find[]

Interesting.

Lee

confused.gif

Yes, FM7 puts the table name in with the source and destination fields for the script steps that refer to fields.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.