There are a couple of ways to do this...
If you're only moving one value between tables you can pass a script parameter. On your button where the script is called, place the field name in the box for the script parameter (specify script dialog box).
When you do the Set Field script step use a calculated value of Get (ScriptParameter).
If you need to pass multiple values you could use local variables (set before you leave the source layout) and then use the variable name in the Set Field step.
Natively, FileMaker only allows for 1 script parameter. There are many custom functions for passing multiple parameters. Check briandunning.com for examples.
From what you write it seems that you want to enter a related value into your Projects form. From the table "Company" to the table "Projects".
"My Primary key field info (from my Company_Form) and puts it into a different layout's (my Projects_Form) Foreign key field from a button on the Company_Form"
Example 1, a dymanic link showing your company information
Create a relation between company and project:
Set the relation to permit creation of related records in the Project table.
Create a portal on the Company Record related to the Project. Use this to create your new projects.
Try the enclosed FileMaker Example File.
example.fmp12.zip 10.8 K
You could also use the script to take the name of the project into variables and then create the new project record and set the fields to those variables.
And there are many other solutions as well.