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 need to write a automatic start up script and I'm not really sure how.

 

Right now I have a report that will calculate information from a set amount of records. You are supposed to put in a "Center" and a "Date" then click on my script "Run Report". I've found that whenever I'm browning records if I switch to that report it will fill in all the fields without my clicking of "Run Report". This can be a problem because there are almost 40,000 records.

 

Is there a way I can have a start up script that has the report stay empty until I click "Run Report"?

That's not right.  Scripts do not run when you switch to a layout unless you have explicitly assigned a script trigger to it.  Go to layout mode, go into Layout Setup and then to the Triggers tab; uncheck anything that is there

 

The other thing that may be happening is that you are not seeing a script running but FileMaker calculating summary fields.  Do you have summary fields on that layout?

Are the "Center" and "Date" fields global?

I've found that whenever I'm browning records if I switch to that report it will fill in all the fields without my clicking of "Run Report". This can be a problem because there are almost 40,000 records.

 

Is there a way I can have a start up script that has the report stay empty until I click "Run Report"?

 

If, when you switch to this report, you are seeing 40,000 records fill in then that is what you have in your found set for that layout (it might be all records).  As Wim says, calculations and summaries will fire on records there.

 

What you MIGHT consider is switch to a layout of that table with no fields on it ( preferably; or at least no calcs), perform your find for those specific records, perform your sorts or actions required and, once ready, switch to the reports layout for final display.  In this way unstored calculations and summaries will only calculate the records in your found set based upon the correct sort order and FM will not need to re-calculate when it refreshes on Reports layout.

Edited by LaRetta

  • Author

I do have calculations and summaries on the report.

 

The "Center" is a global field but "Date" isn't.

 

I'd ideally like them to just be able to go over to the report, type in the needed information, then "Run Report" and have my calculations and fields run. Is there anyway this can happen? Some extra words I can put into my calculations that don't run until script is performed or something?

If there are calcs and summary fields on the layout, FileMaker will calculate them when they show on screen.

 

For cases like this, I go to a simple layout that has the fields required to generate the report - say a Start Date, end Date and other criteria - then generate the find and sort before displaying the screen with all the Calcs and Summaries on it.

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.