4 Replies Latest reply on Dec 9, 2013 11:08 AM by CekariYH

    Stripping out formatting

    SteveKeiser

      Title

      Stripping out formatting

      Post

           I'm having some formatting issues because of people copying and pasting to enter stuff into Filemaker. I use the auto-enter calculation with "self" to correct some things, but I cannot figure out how to get the calculation to do more than one thing (like set the font to x and set the font size to y in addition to things like Proper (self). Is this possible? Essentially, when people paste things in, I want the result to be a paste without copying any formatting.

        • 1. Re: Stripping out formatting
          philmodjunk

               Once the format is stripped out consistently, enter layout mode, select the field and use the formatting options in the Inspector's appearance section to specify the style, font, fontsize, etc.

               This specifies an appearance for your text that is specific to one layout.

               If you want to format the data itself, so that it can be copy/pasted with this style to other applications or so that it appears with this format on all layouts:

               Let ( s = TextFormatRemove ( self ) ;
                       TextSize ( TextStyleAdd ( s  ; TitleCase ) ; 18 )
                      )

               or

               TextSize ( TextStyleAdd ( TextFormatRemove ( self )  ; TitleCase ) ; 18 )

               could be used to produce text of size 18 and "Proper" style. (TitleCase and Proper both capitalize the first letter of each word of self.)

          • 2. Re: Stripping out formatting
            CekariYH

                 TitelCase?

            • 3. Re: Stripping out formatting
              philmodjunk

                   TitleCase is a style option in the style menus you can specify for a field, block of layout text or button label text. If you look up the TextStyleAdd function in FileMaker help, you'll find that TitleCase is also one of many constants that you can use to specify what styles to apply to the text passed to it as the first parameter.

                   Had I used Bold + TitleCase, we would get text styled as bold and with the first letter of each word capitalized.

              • 4. Re: Stripping out formatting
                CekariYH

                     Ah, know i got it, thought it was some kind of those hidden functions...