I just mocked this up and cannot replicate what you are seeing.
I made a portal into a related table, put text into the portal row and colored the text box.
I linked a script to the colored text box (button).
I see that, when child records cannot be made through the relationship, the button appears in portal rows corresponding to related records.
I see that, when child records CAN be made through the relationship, the button appears in portal rows with related records plus one empty row at the bottom.
Did you check to see if your text box (or group) making up your button is wholly within the portal row? I'm not sure how this would make a significant difference, but have noticed some weirdness when you have objects overlap portal boundaries.
Well, I deleted the original portal, closed the file, restarted FMP 10 Adv, and recreated the portal entirely. All the portal fields are set to NOT allow new records to be made from within the portal (except the button, of course).
I also resized the button to insure that it is entirely within the portal field lines.
Now I only get the errant button displayed on the FIRST empty line. Clicking on the button does nothing, because there's no related record to go to.
Later when I get back I'll post a jpg of it...gotta run to a meeting.
Another thing to check before bothering with a screen shot is whether or not extra blank records exist in the related table. GTRR is a powerful tool, but can have unexpected consequences when not used *perfectly*. One common side effect is unwanted creation of blank records...particularly when you are using GTRR to create records in a related table.
Jot down the linking ID on the parent table, go to a layout based on the child table, perform a find for that ID. Verify that when two records show up in your portal that there are actually two matching records in the child table...not 2 records with data and 47 without data.
Blank records in your child table could very well cause what you are describing.
To expand on Ninja's caution on GTRR:
Go To Related Records is a very useful tool, but which is very poorly documented. To learn more about GTRR, click the following link:
The Complete Go To Related Record
I had already found and read that post about GTRR. I don't think any of those anomalies apply here, though. The buttons work perfectly.
I checked the child table closely, and there are no empty records. I only have three records in the parent table and 13 in the child table. All the buttons map correctly to the corresponding record in the child table, and vice versa (back from the child table to the parent table).
All three records in the parent table exhibit the same blank record at the end, but showing the button. The button does not work on those blank lines. Clicking it does nothing, and there's no error indication.
Here's a shot of the portal from one record. The other two records in the parent table look just like that, but with different numbers of records in the portal.
We're chasing a figment. That's exactly what it SHOULD look like. The only way to lose the bottom button on the blank line is to prohibit new records from being created in the child table through the portal.
I wondered earlier if that was what we were looking at here, but you earlier said blank rows and that had me thinking you were seeing more than one blank row in the portal.
What I do with that bottom row button, is use conditional formatting to specify a grey text color for the button's label text if the portal's key field is empty. (It'll only be empty on this bottom row.) That gives it a "disabled" look to signal the user that nothing will happen if they click it.
You got it! I specifically did NOT want the user to enter new records in the child table via the portal; there's a separate button outside the portal to do that. The child table requires much more data for a complete record; the portal in the parent table is just there so the user can quickly see what issues are open or closed.
I did not realize that in the relationship the box for creating new records via the relationship was ticked. I don't know why I would have done that, but my mistake started me on this thread.
I knew it had to have been something I did (wrong).