This can certainly be scripted but in most cases is not necessary.
Set Variable [$ID; Value: Yourtable:: ProjectNumber]
Go To Layout [Select layout for related table]
Set Field [RelatedTable:: ProjectNumber; $ID]
Go To Layout [Original layout]
With the right relationship options and a portal, the above script will be unecessary as this process will hapen each time a person enters data in the bottom blank row of the portal to add a new related record.
Thank you for your help. Please excuse my ignorance as I am a novice at filemaker. I do have a portal in the layout for the project table from the related table. But I did not know you can add new records to the related table from the portal. How is that done? My portal doesn't have a bottom blank row.
Open manage | database | Relationships and find the two TableOccurrence boxes for your layout and portal. Double-click the line that links them. In the dialog that pops up click the check box labeled "Allow creation of records via this relationship" for the portal records. You may also want to click the Delete check box next to it. (with that option selected, deleting a record in your main table automatically deletes the related records in your portal which is usually what you would want to have happen.)
Many folks get confused over the terms Table and Table Occurrence. To learn more, click the following link:
Table vs. Table Occurrence (Tutorial)
Your my hero. You don't know how much work you saved me. It works great!!!!!!!!!!!!!!!!