March 25, 201312 yr 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"?
March 25, 201312 yr 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?
March 26, 201312 yr 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, 201312 yr by LaRetta
March 26, 201312 yr 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?
March 26, 201312 yr 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