Yes you could create a script for this. If you don't have any experience creating scripts, I suggest learning more about them soon as they are needed to harness the full power of Filemaker.
Consider the following manual search:
Select a layout that displays the required fields from Clients.
Enter find mode and type in the search criteria, "PIPPO", in the appropriate field or fields.
Click "Find" to find all records that match your search information.
If you find more than one record move through each record to find the one you want.
Copy "Code Client" to the clipboard.
Select your invoice layout and (if necessary) the specific invoice record you are editing.
Paste Code Client into the appropriate field.
Using scripts and relationships. It's possible to do the same basic steps. The exact details of this script will depend in large part on how you design your tables, relationships and layouts.
> Copy "Code Client" to the clipboard...
> Paste Code Client into the appropriate field
I do not think that those advices are correct...
didn't we have globals and don't we have now $ variables ? ;)
You are correct and that is exactly how I would do it. I am describing how you would do this Manually (not in a script), to give you the concept that the script should duplicate in an automatic fashion. I did that because I didn't want to assume you were familiar with scripting.