If you set up a time stamp field with an auto-enter creation time stamp in your table, then you can set the portal or its relationship to sort on that field.
This seems a simple thing to do, unless I am missing something?
Defined two tables: Parent, Child.
Parent has one field: PrimKey, auto-enter serial number
Child has two fields: Fkey (number), TimeStamp (timestamp) - set to auto enter creation time stamp.
Defined a relationship: Parent:: PrimKey--=--Child::Fkey
Set "allow creation..." option
Set it to sort on TimeStamp in Descending order.
Created a short script:
- Freeze Window
- Set Variable [ $Pk; Value: PortalExp:: PrimKey ]
- Go to Layout [ "Children" (Children) ]
- New Record/Request
- Set Field [ Children::Fkey; $PK ]
- Go to Layout [ original layout ]
Created a portal on the Parent Layout and added a button to run this script.
Each click of the button creates a new portal row record at the top of the portal.
You may be correct Phil. I orig read it as adding data in a portal using Allow creation. Re-reading it, it seems as though the OP use a button to create a new related record. The link to the methods I posted was for quick entry without a script.