Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to correct formatting of a field after cutting and pasting into field?

Featured Replies

I have noticed that, when cutting and pasting into a field, that the formatting information is copied from the source of the cut instead of from the definition of the field. I find this quite annoying as it makes my database look more and more irregular over time. I have two questions:

1) Is there a way to force the use of the field definition when cutting and pasting into a field?

2) How can I reset the formatting information to that of the field definition after it has been changed by cutting and pasting? Oviously I want to do this with a script, but I can't find any script commands that affect the format of a field. Surely there must be such commands.

John Link

Use the Key Combination of Cmd +Option +V

You could also set the field to auto entry from calculation with replacement to itself "TextFormatRemove (Field 1)". When you leave the field all formating will be removed automatically.

  • Author

Use the Key Combination of Cmd +Option +V

That seems to have the same effect as Cmd +V, which is to replace the contents of the field with the contents of the clipboard, using the format of whatever is already in the field. Did I misunderstand something?

Now I understand. If I use Cmd +Option +V when pasting then the formatting of the field definition will be used. While I could make a practice of doing that, I'm afraid that there is no way I could enforce others to do the same. Secondly, my database is already cluttered with random formats that I want to correct.

John Link

Edited by Guest

  • Author

You could also set the field to auto entry from calculation with replacement to itself "TextFormatRemove (Field 1)". When you leave the field all formating will be removed automatically.

Would you explain in detail what you mean? Is your suggestion to be used to clean up my database or to prevent the problem in the first place?

John Link

Sorry, didn't mean to be cryptic. If you set a field to have an autoentry via a calculation (checking the replace contents option). The calculation that I presented in the previous post will strip away all the formatting in any text in the field when the field is exited. try it to see what I mean.

Edited by Guest

If you are doing this on a Mac, then that is the Key combination. Be sure to hold three keys in unision.

I'm thinking that you are really wanting to change the errant formatting now, and it is already in the field. You can NOT just copy and the Paste it back in the field, you have Cut The Text, click outside field, and then paste it back in the field using the Key combo;.

However, it this what you want, then it would be easier to create a Script Using the script step [color:red]Set Field, and the Text Function; TextFormatRemoved as suggested for a calculation. However using the Script, makes it unnecessary to have another filed.

Set Field [ YourField ; TextFormatRemove ( yourField ) ]

HTH

Lee

  • Author

Thank you for your suggestions. I'll experiment and see how it goes. But it seems that there ought to be a way to protect a field from a formatting change so that I would not have to run a script that corrects every field in the entire database. The previous database I used, Now Contact, has that feature. Surely there must be a way to do it in Filemaker.

John Link

That's what the auto-enter calc that Bailey showed would do.

Exactly. and it doesn't require that you run a script...it happens automatically whenever a field is edited.

  • 3 weeks later...
  • Author

Thank you all for your help. I have redefined all the fields using the TextFormatRemove function so that no new formatting information will be introduced into the database, and I am now running a script that for every field in every record sets the field equal to itself, thereby removing all the irregular formatting already in the database.

John Link

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.