Are all your layouts using the same Table and is the layout based on the same Table Occurrence?
If so then the calculation in your script just needs to reference the field directly
However if it is not this simple then you could give the fields on all your layouts Object Names, via the Object Info toolbar, and then in your script you will reference the name, which will be the same for the same field on all your layouts, you then use the GetLayoutObjectAttribute function in your calculation to get the value of the field
GetLayoutObjectAttribute ( "Last Name" ; "Content" )
This assumes you gave all your last name fields the Object Name "Last Name".
I hope this helps.
Thanks. GetLayoutObjectAttribute does the job.