Use just TextFormatRemove and remove all formatting from the pasted text. Then the formats specified for the field via the inspector's appearance tab will control the formatting of the data in the field.
You can use
TextFormatRemove ( Self )
as an auto-enter calculation on the field with the "do not replace existing value..." check box cleared and any new pastes into this field will automatically have all formatting removed.
You can use TextFormatRemvoe ( PutYourFieldNameHere ) with the Replace field contents tool to do a batch update of your existing data.
I tried both solutions and they do format to the current layout but if I switch to the one with the Arial 8 it hasn't changed? Any reason why it isn't or anything I need to check?
THis is a frequently recommended fix used by many different FileMaker Developers.
There isn't two solutions here, just one. One application of it works for future records and one cleans up your existing data. Replace Field contents should be used after you use Show All Records to pull all records into the current found set as this tool only modifies records that are in the found set.
If you did Replace Field Contents after selecting SHow All records already, better check to make sure that this field formatted with arial, 8 is the same field.
Ihave it set up as an auto-enter calculation for the field and it changes when I go to the next field but when I go to the other layout this is what I see:
Is this the same record? Is it the same field?
Please note that the auto-enter calculation will only kick in when you enter/modify data in the field. Text entered into the field before you added this auto-enter calc will not update to remove the formatting. That's why you also need to use Replace Field Contents as a one time fix to "clean up" your pre-existing text.
Yes, same record, same field. I just created this record and copy and pasted to that field and once I tab to the next field it changed it to the format I have set for that layout as seen below:
Then if I switch to this layout, this is the result and all the fields are set to the same format for text:
Here is another layout I have and again all the fields are set for the same format and that is the only field that is a problem:
Let's try a small experiment.
Add a new text field to your table. Define the same textFormatRemove ( Self ) auto-enter calculation for it.
Use replace field contents to copy the data from the current field to the new field. Place this new field on your layout and format it as needed.
Does it then show the correct formatting?
Made the new field, but I am lost on the next step, just a novice with FMP, can you please elaborate?
If you have done the Replace Field Contents operations I suggested earlier. These steps should be very familiar.
Make a back up copy of your file. (replace fields will modify every record in your table and cannot be undone. this back up copy enables you to discard the original file and use your back up copy if you make a mistake during this process.)
Open Manage | Database | Fields. Double click the definition for the new field. Click the Auto-Enter tab. Click the calculation option. Copy and paste this text into the field:
TextFormatRemove ( Self )
Clear the "do not replace existing value..." check box.
Go to a layout based on this same table. (The table should be listed in Layout Setup | Show Records from).
Enter layout mode.
Use the field tool to place the new field on your layout.
Enter browse mode. Click or tab into the new field.
Select Show All Records from the Records menu
Select Replace Field Contents from the Records Menu
Select the Calculation option.
Select or enter the name of the original field as your calculation.
Perform the Replace Fields operation.
Haven't tried the above yet, but last night I added a new record with no change but I decided I would select the entire contents of that field and then right click and set the font and size. Which when I did it was the correct format for that layout but I selected it again anyway and then I jumped to one of the other layouts that won't format correctly and it was correct. Not sure why it works that way but not using the script or the auto enter.
I have not specified any script. I would check to see if the "Do not replace existing value..." check box is selected for the field. It should not be selected.