It would help to see the layout where you have this merge field. And "merge field" in the FileMaker world is a field placed on a layout inside a block of layout text like this:
some layout text <<mergeFieldHere>> Some more layout text
If that's what you have, a view of this layout captured while it is in Layout Mode will be the view most likely to reveal problems, if any exist, in your layout design.
Sometimes we get a description of a "merge field" that is actually a calculation that concatenates (merges) data from 2 or more fields so please confirm exactly what you mean by a "merge field".
I have attached the layout with the problems, As I said out of 10 records this is the only one not displaying correctly. If I change client ID then that client will show correctly.
The "client::" part of the merge field entry would seem to indicate that you are referring to a field from a related table.
I suggest the following test to confirm a guess on my part:
Put an unsorted, unfiltered portal to Client on this layout and put the client::Client_name field inside the portal row. Make sure that you can see more than one portal row.
My guess here is that you'll see a blank client_name field in the first portal row.
yep blank, but not on the other 9 invoices???
I see why now. thanks for your help I wouldn't have seen the problem without your input
Then the other 9 invoices match to different records.
When you put a reference to a field from a related table on your layout without putting it into a portal, you get data from the "first" related record. In an unsorted relationship, this will be the oldest related record. Changing the sort order inside Manage | Database | Relationships for the relationship that links the two tables can change which record is "first", but in this case, it would seem that you need to find and correct that client record. Seems a bit odd that you would have more than one client record that matches here if you are matching by a client ID so this could indicate a fairly significant design issue that needs to be corrected.
This record was the only one without any line items(tasks) and the relationship goes clients->Lines->invoices, I do have another table occurrence of clients spacificly for invoices, but pointed to the wrong one. but because the other 9 worked fine I thought nothing of it.
once again many thanks