Jump to content

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


John Link
 Share

This topic is 5589 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

This topic is 5589 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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