3 Replies Latest reply on Nov 19, 2010 6:11 AM by akpud

    Creating a script to change font



      Creating a script to change font




        Is there a way to ensure that all data entered into a certain field will be a certain font, style and size?  A lot of the data entry we do into one field requires copying and pasting, and can come in different fonts.  I'm not sure if it would be a script, conditional formatting or perhaps just a setting.


      thanks so much 

        • 1. Re: Creating a script to change font

          You can try an auto-entry with calculated result on the field of:

          TextFormatRemove ( Self )



          Make sure that the 'Do not replace existing value' is unchecked.



          This will keep your text unformatted. Then you can apply the type of formatting you have set for the field, instead of the data.

          • 2. Re: Creating a script to change font

            You can set an auto-enter by calculation. Open Manage | Database | Fields. Double click the field definition entry for your field and then click the auto-enter tab on the dialog that pops up.


            Select the calculated value option and enter an expression:


            TextStyleAdd ( TextSize ( TextFont( self ; "Arial”) ; 18 ) ; Italic )



            Will insure that all entries in the given field are Arial font, size 18, in Italic style. You can read up on these functions in the help system.


            After you enter your expression and click OK, clear the "Do not replace existing value" check box just below it.



            • 3. Re: Creating a script to change font

              What would be the entry to leave the text as "Plain Text"?

              TextStyleAdd ( TextSize ( TextFont( self ; "Arial”) ; 18 ) ; Italic )