April 19, 200520 yr Newbies 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
April 19, 200520 yr use the set field step and set the field to itself. that should change any formatting to the default for that field...
April 19, 200520 yr 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.
April 20, 200520 yr 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 ) )
April 27, 200520 yr Author Newbies Probably too late a reply for anyone to notice, but thanks for the help everybody!
Create an account or sign in to comment