June 3, 201411 yr I use "Go To Related Records" from table "Inspections" using Layout "Reporting Template" After that runs, I have to run a "Sort Records" command. This template gathers data from fields within the Inspections table and presents it in a report fashion for customers. This report gets printed to PDF and is the deliverable. When I use Go To Related Records, I see only the record I want to print. But if I dont include the Sort Records in the script, it reverts to creating a view with every record in the database. each report is about 10 pages, so instead of a 10 page report with just the 1 record I want to report, I get a 500 page PDF with every record in the database. I know I'm probably not explaining it properly. What I want is to run the script through a button that will create a report for only that record (or inspection) I'm not sure how to do a sort to only get 1 record every time. I have a unique record ID for each along with unique UUIDs since this project will be used offline with the help of mirrorsync
June 3, 201411 yr http://forums.filemaker.com/posts/9253613387 Pay particular attention to the section that talks about Show Only Related Records, Match Current Record Only, and Match All records in the Found Set.
June 3, 201411 yr "I use "Go To Related Records" from table "Inspections" using Layout "Reporting Template"" "This template gathers data from fields within the Inspections table" Not clear. What are the tables and what are the relationships?
June 3, 201411 yr I know I'm probably not explaining it properly. I'll say. To begin with, Sort Records re-orders the records of the current found set. It does not change the found set in any way.
June 3, 201411 yr Author ok let me see if I can show it better with a screenshot My apologies for some of the whited out areas. We're still in development and my company is extremely sensitive to security. The script is activated via a button from within the application. This is the script that runs At the "Show related records" portion, a new window opens and shows only the record I want to print to PDF If I remove the Sort Record [restore], the new window immediately populates with data from the rest of the records. If I keep the Sort Record [restore], no matter what sorting I do, I get data for all records, not just for the single record I want to export. In this screenshot, I took out the sort criteria while I work on defining something that will only show a single record. If I hit cancel or unsort, it will once again populate data for all records, not just the one record I want.
June 3, 201411 yr Being extremely sensitive to security is going to make it tough to diagnose this. I do notice the layout in your screenshot is not the same layout you're telling the GTRR script step to use. Also, these two claims appear incongruous: "If I remove the Sort Record [restore], the new window immediately populates with data from the rest of the records. If I keep the Sort Record [restore], no matter what sorting I do, I get data for all records, not just for the single record I want to export. " Do you have summary parts on your layout? Are you using "export" to mean "print"? Finally, sometimes it's not worth figuring out what is happening if you can fix it. You could simply grab the ID of the record you're on into a variable, go to the layout you want to print from and do a find.
June 3, 201411 yr Author Do you have any script triggers attached to the target layout ("Report Template")? none Being extremely sensitive to security is going to make it tough to diagnose this. I do notice the layout in your screenshot is not the same layout you're telling the GTRR script step to use. Also, these two claims appear incongruous: "If I remove the Sort Record [restore], the new window immediately populates with data from the rest of the records. If I keep the Sort Record [restore], no matter what sorting I do, I get data for all records, not just for the single record I want to export. " Do you have summary parts on your layout? Are you using "export" to mean "print"? Finally, sometimes it's not worth figuring out what is happening if you can fix it. You could simply grab the ID of the record you're on into a variable, go to the layout you want to print from and do a find. I just noticed the layout discrepancy. Ive been overlooking it all day. I'm going to work and see if thats got something to do with it, and figure out where the layout changes in the script process would probably be a good idea to walk away for an hour or so and clear out my thoughts. come back to it fresh. thanks.
June 3, 201411 yr Author alright, I guess we can disregard everything I've said previous. I took a small break, came back and started working on a find script. looks like my issue was much simpler than what I've been looking at. When doing an OS check, I put " > 2 " as the check. should have been " < 2" so it was going to the next step, "Enter Preview" I just tested it, if I go into preview in the report layout, it will show previews for every single record. chalk this up to end user error. thanks all
June 3, 201411 yr ok let me see if I can show it better with a screenshot My apologies for some of the whited out areas. We're still in development and my company is extremely sensitive to security. You can save a copy of your files using the “No Records” option, which shouldn’t give way any trade secrets. Attaching a copy of the files often speeds up the process of getting your problems solved. If you have any problems doing this, or have some questions, contact me via the Private Message. Lee
Create an account or sign in to comment