tussing515 Posted March 25, 2013 Posted March 25, 2013 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"?
Wim Decorte Posted March 25, 2013 Posted March 25, 2013 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?
LaRetta Posted March 26, 2013 Posted March 26, 2013 (edited) 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 March 26, 2013 by LaRetta
tussing515 Posted March 26, 2013 Author Posted March 26, 2013 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?
webko Posted March 26, 2013 Posted March 26, 2013 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.
Recommended Posts
This topic is 4329 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 accountSign in
Already have an account? Sign in here.
Sign In Now