The script could be:
Set Variable [$comp; Value: Table::CompanyField]
New Record Request
Set Field [Table::CompanyField; Value:$comp]
Go to Field //select field you want the cursor to land in to start entering data
And then what do you do when the company is sold and the new owners change the name?
You might, instead, set up a related table of companies and link each contact record to a different record in Companies by an ID number instead of a name.
So what is the best script for this ?
What does your data model look like? Steve Martino's script can easily be modified to copy forward a CompanyID in exactly the same manner as it copies forward a company name.
But it requires that you set up a table in Manage Databases for company information such that you need only enter (or update) a company's name in a single field of a single record.
Company name should not be defined as a field in contacts, only define it in the company table
Anywhere you have a contact record on display in your database, you can use the relationship to include the company name.
What you show looks like a classic summary report based on the contacts table with a sub summary layout part ("when sorted by company") used to list the company name as a sub heading above each group of contacts from the same company.
Also, a portal to contacts placed on your Company layout could be used to add multiple contact records simply by adding data into the bottom "add row" of the portal. (Enable "allow creation of records for contacts in the company to contacts relationship.)
Okay, I will try that and add some experiment to my project. Thanks!