The Go to Portal Row script step is what you are looking for. Go to Portal Row[Last] will bring the user to the last portal row, the one used to add a new row.
You might also put an "add row" of sorts at the top. I've seen a very clever approach where you put a one row filtered portal just above your current portal. The portal filter is set to filter out all records where the match field is not empty and thus only the "add row" appears in that one row portal.
You can also remove the "create" option from the relationship, sort the relationship or the portal to put a blank record at the top and put a button on your layout that uses a script to create a blank related record in the portal's table.
Thank you for that tip.
I think there might be a bug with the portal handling because even after I inserted the Go to Portal Row[Last] command into the 'Save' button script, the portal scrolls up to the first record of the portal. My gut tells me Filemaker did indeed go to the last record(active) in terms of processing on the back-end, but only that it is not visible on screen.
To be more precise, here is how my portal looks, before and after. Assume I have entered 15 records and clicked 'save', after which I would like the 16th(new) record to show on the top of the portal. Since the portal shows 10 rows at a time, my screen lists records 6 through 15.
OrderLineID6 Item6 Qty6 [Save Button][Delete Button]
OrderLineID7 Item7 Qty7 [Save Button][Delete Button]
OrderLineID8 Item7 Qty8 [Save Button][Delete Button]
OrderLineID9 Item7 Qty9 [Save Button][Delete Button]
OrderLineID14 Item14 Qty14 [Save Button][Delete Button]
OrderLineID15 Item15 Qty15 [Save Button][Delete Button]<---Click Save
<PORTAL AFTER Clicking Save on Record #15>
OrderLineID1 Item1 Qty1 [Save Button][Delete Button]
OrderLineID2 Item2 Qty2 [Save Button][Delete Button]
OrderLineID3 Item3 Qty3 [Save Button][Delete Button]
OrderLineID4 Item4 Qty4 [Save Button][Delete Button]
OrderLineID9 Item9 Qty9 [Save Button][Delete Button]
OrderLineID10 Item10 Qty10 [Save Button][Delete Button]
Am I missing something?
I had already unclicked the relationship options('create' and 'delete',) and will now try your suggestion of having two portals to mimic the behavior that I am seeking.
I found out that if there is no scroll bar on the portal, portal will not get to the empty row. I guess it's not the case for you since you do not want to scroll manually.
Do you FMP Advanced ? If so, you could use the script debugger to get what script step brings the portal to top.
Note that the portal will not scroll in order to show the last line on the first displayed row.
As is usually the case, I had a bug in my code.
I made the rookie error of having two scripts handling the save button, one for clicking and one for pressing keys ('Enter' and 'Return'.)
It now works! Thanks.
I just realized that the following answered my original question(assuming the solution I seek is using a single portal): "Note that the portal will not scroll in order to show the last line on the first displayed row"
Thanks for that as well!
Glad you solved the issue !