Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Portal Row Printing


Onesimus

Recommended Posts

I am having trouble with Portal Row Printing

 

With this post is my database called MASTER. NOTE: THE FILE CONTAINS ONLY ONE STUDENT – “POLLY STYRENE”.

 

I can best describe the situation by asking you to do the following:

 

1. Login to MASTER. The account name and password are both “abc” (lower-case).

 

2. Click the red “Zero Award Tasks” button.

 

If you click the print icon that appears in the right of each portal row, a “Student/Parent Notification of Zero Award” letter appears which can be previewed and/or printed depending on what is selected from the drop down menu below the portal.

 

This print button displays the correct letter for the record selected in the portal.

 

So far, so good…

 

3. Go back to the main menu by selecting the blue “Main” button.

 

4. Select the red “Pastoral Concerns” button.

 

As you can see, a set-up similar to what you have just seen.

 

HOWEVER, if you click some print buttons (notably the third button, 15 June – Incorrect Uniform), FileMaker does something weird: it goes into preview mode showing an unrelated record. Clicking the “Continue” button in the status area then causes FileMaker to close!

 

While this situation only occurs once in 4 records in this trial database, on the one we use at school, it is happening a lot … (I’ve had to delete the print button in the file used at school to prevent problems with staff).

 

An IT –Co-ordinator (no longer present) said that the cause of the problem lies in that no SN number is being created for the records which are aborting. If you check the relationship diagram, (File>Define>Database>Relationships) the Infringements Table and Infringements 3 Table (the table where the records for the Infringement Summary letter come from) are linked via an SN field (SN=SN). If you go into layout mode, and use the Field tool to drag the SN field from the Infringements table to the top portal layer, then go into browse mode, you will see some records with an SN number, some not! It is those records without an SN number that are aborting.

 

SO, I know what is happening, but I do not know how to fix the problem. Why is no SN number being created?

 

The strange thing was that the first thing you went to, the “Student/Parent Notification of Zero Award” letters works perfectly!

 

Sorry for such a long letter, but I would love to know:

 

1. What is causing the problem?

2. What did you do to fix the problem?

 

Sorry for this email being so long …. but best wishes from the Land Downunder!

 

Frank Bugeja

Link to comment
Share on other sites

First off, nice design - everything works well and is laid out nicely.

 

In your Pastoral Concerns screen, I added the SN field to the portal so that I could see the serial numbers on the records - for some reason that third record had no SN while the rest did.

 

The obvious solution to this is to change the definition of SN in the Infringements table so that SN is a required, unique value. Also, I noted that it's already set to generate on record creation vs. record commit, which I think is fine.

 

I tried adding infringements to Ms. Styrene's record and the SN's seemed to generate fine. I have no idea why that third record had no SN, but once I filled one in manually, it worked fine.

 

As to why this happened in the first place, I couldn't tell you since I have no idea how that record was created.

 

Why this causes a crash in Filemaker is beyond me as well - you'd figure that it would warn you before dying like that.

 

In any case, as a general rule, SN fields should be unique and required - that should tighten your solution.

Link to comment
Share on other sites

It looks like you trying to filter the found set down to the selected record by using the "Infringements 3" TO in the Go to Related Records[] step. But as you've discovered, if the SN field is empty, then the relationship doesn't work, and the script fails.

 

I don't know why the SN field would not get auto-entered on some records (I've never had problems with auto-entered serial numbers.) Could those have been imported from another file and not updated?

 

Anyway, though you could find work-arounds to deal with records that are missing the SN, I think you should try to figure out why some of those are empty as this could cause problems elsewhere too.

Link to comment
Share on other sites

FileMaker closes on those records because the GTRR step failed to open a new window. The existing window closes instead when it gets to the Close Window step.

Link to comment
Share on other sites

Thanks Ender and Frigante.

 

Solution found. The problem was that the serial number was turned on AFTER the first records were created! I put MASTER into service at the school I teach at last Monday and, during the week, staff asked if certain functions could be added. One was that print button to print out student infringement summaries. Given that staff had begun using MASTER, and quite heavily before the print button was put into the database, it was no wonder that FileMaker exited when trying to deal with records with no serial number!

 

I intend getting a copy of MaStER from the school's main server and re-importing all records into a clean (empty) copy then re-installing it on the server. That should solve the problem. If not, then the patch that I introduced into the program today telling staff that "This record cannot be printed" (without exiting) will do. Given that, over time, the number of records not being able to be printed will become very small, it will be a problem we can live with!

 

Onesimus

Link to comment
Share on other sites

You can easily renumber those records that are missing a serial number by finding those that are empty, then using Records->Replace Contents to add serial numbers (keeping the option to update the next serial value.)

 

Be sure to make a backup before running the Replace Contents command, as there is no undo.

Link to comment
Share on other sites

[ QUOTE ]

I would also strongly recommend that you change your SN field definitions to be unique and required!

 

[/ QUOTE ]

 

I would not do this. If the field is defined as a serial value, then these options aren't needed. Also, in large files, the Unique options slows down record creation as the database has to check that the value does not exist in any other records.

 

However, for primary keys, it's not a bad idea to check the "Prohibit modification of value during data entry" option.

Link to comment
Share on other sites

Interesting, Ender - I had no idea that the unique option would cause much of a performance hit.

 

I will point out that SN is a key in this case, at least in the Master table - I'd have to look at the solution a little more closely to make a real determination about the rest of it though.

 

I still think it's a good idea to make sure it's a required value so that the problem doesn't re-occur. Any caveats here?

Link to comment
Share on other sites

Ideally, primary keys should not be accessible to users to enter or edit anyways. And it is often desirable to hide the keys from the user completely. In these cases, it does no good to have the Required or Unique options selected, as the field is not accessible, and could not be fixed if there were a problem. By going with an auto-entered serial number and not allowing it to be edited, the Required and Unique options will not be needed.

Link to comment
Share on other sites

Again, thanks Ender & frigante for your input, especially on the posts after my "Solution found" poster. MaStER has been very heavily used (esp.when you have 60 teachers and 1000 students!) so that, during a school year (end of Jan to a week before Christmas in Australia), MaStER will become quite large; anything that impedes performance will become an important issue. I will keep both of your points in mind as I keep watch over MaStER!

 

Again, thanks!

 

Onesimus

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use