Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

Help needed: Is there anyway to make text revert to the field default with regards to its style, size & font.

The situation is that my clients copy and paste a lot of data from the internet into various fields in the database. I'd really love it if there was an easy way for the sometimes huge and colored text that gets pasted in, to be reverted to the default for the field.

I don't think there is anyway to make the field not allow the text attributes to be overwritten, but is there a function or combo of functions that I can use in a script to make it conform. I realize that the new FM7 text formating functions has a remove style function... but there is no remove overwritten size, color, and font. The other functions there can be used to force text to be a certain font, size, or color...but then I'd have to write a script for each field that had different defaults.

What i'd like to do it make a universal - revert to text to default - and set it to Command+1 in the scripts menu so that when they paste a funky piece of text, they can punch the key combo command to have the text conform in any field they use.

Thanks

Posted

Welcome Werker,

If you hold down the option key as you paste, that will paste without style. But for a more foolproof solution, you could use this Auto-entered calc, defined on the fields that users paste stuff into:

Evaluate ( Quote ( Field ) )

This could alternatively be used in a Set Field script or a Replace, if it's a one-time thing.

Posted

Elvis wrote: "use the set field step and set the field to itself. that should change any formatting to the default for that field"

This works a treat in FMP 6 and earlier, because character formatting is lost by the calculation engine.

However in FMP 7 and later, character formatting is preserved by the calculation engine, so it does not strip formatting like it used to.

One common expression for stripping formatting that pops up often in Forums lke this is

Evaluate( Quote ( textfield ) )

This topic is 7153 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
×
×
  • Create New...

Important Information

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