6 Replies Latest reply on Feb 6, 2016 10:17 AM by dgmjr

    Text Formatting


      Hello Everyone,


      The problem: 

      I have a text field that is used in two different layouts. I want to format the entered text in the field and have it appear in a different format on each layout.



      I have one field, named "Description" and two layouts, Layout 1 and Layout 2.  I cut and paste the phase 'My home' into the "Description" field on Layout 1.  Lets say 'My home' pasted tin the format:16 point, Times New Roman. I what the text to appear in the field as 12 point, Comic Sans MS in Layout 1, however, in Layout 2, I want it to appear as 10 point, Comic Sans MS, Bold in Layout 2.


      Attempted solution:

      I have tried using a calculated valve as an auto-enter with the following calculation:


      TextFormatRemove ( Self )


      If ( LayoutObjectNames ( "HOME.fmp12" ;( "Layout 1" ));TextSize ( Self ; 12 ) ; TextSize ( Self ; 10) )


      TextFont ( Self ; "Comic Sans MS" )


      The font size is working (layout 1 is 12 point and Layout 2 is 10 point)

      The problem is with the results is: 1

      I believe it is the 'and" that is problem and why it is resulting in a boolean response.


      Any thoughts would greatly be appreciated.