Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum
Hyperscripter

Problem with Text Formatting Function

Recommended Posts

Hyperscripter

I am having a problem with this, it all works except for the 'TextStyleAdd' part. It seems to be ignored:

 

TextColor ( TextSize ( TextStyleAdd ( TextFont ( Self ; Font ) ; Style ); Size ); RGB ( RValue ; GValue ; BValue ) )

 

Anyone have any ideas on this ? Obviously, the syntax of this is acceptable to Scriptmaker, so it seems that it should work. Font,Style,Size, RValue,Gvalue and Bvalue are all fields and are of the correct data types, so I haven't a clue as to why this will not format the style for me.

Share this post


Link to post
Share on other sites
Robert Schaub

try

TextSize( TextFont( TextColor( MyTable::MyText; RGB( 0 ; 125 ; 125 ) ); "Courier" ) ; 12)

Share this post


Link to post
Share on other sites
Hyperscripter

OK, what I think you're telling me is to change the order of the functions, but like I said, this works perfectly fine as it stands, except that I cannot get the text style part of it to work.

Share this post


Link to post
Share on other sites
Hyperscripter

Not sure why it has to be done this way, but I discovered that this works using two instances of 'Set Field':

 

TextColor ( TextSize ( TextFont ( Picture File::GraphicName ; "Courier New"); 24 ); RGB ( 225 ; 0 ; 175 ) )

 

TextStyleAdd ( Picture File::GraphicName ; Italic )

 

The reason that I used Self in the original was because it was for a calculation field.

Share this post


Link to post
Share on other sites
eos

This works for me:

 

TextStyleAdd ( 
 TextColor ( 
   TextSize ( 
   TextFont ( 
     Navigation::Layout Name ; "Courier New" ) ;
     ) ; 
   24 ); 
 RGB ( 225 ; 0 ; 175 ) 
 ) ;
Italic 
)

this works using two instances of 'Set Field'

 

Rather than using Set Field[] several times, you can …

 

Let ( [
 one = TextColor ( Picture File::GraphicName ; RGB ( 225 ; 0 ; 175 ) ) ; 
 two = TextSize ( one ; 23 ) ;
 three = TextFont ( two ; "Courier New" ) ; 
 four = TextStyleAdd ( three ; Italic )
 ] ;
 four
)

Share this post


Link to post
Share on other sites
CNycz

I'm having a similar problem. This is part of an automated email:

 

TextStyleAdd ("blahblahblah" ; Bold)

 

Using a field instead of text doesn't work either. Suggestions?

Share this post


Link to post
Share on other sites
AHunter3
I'm having a similar problem. This is part of an automated email:

 

(emphasis added)

 

Are you trying to send out formatted email, in which all or part of the email body is formatted bold? It doesn't work because it doesn't work, not because you're doing something wrong.

 

Email is a plain text format. Accordingly, FileMaker does not natively support formatting of email bodies. (There are plug-ins that do).

Share this post


Link to post
Share on other sites
CNycz

Yes, I was adding a header in the body of the email as bold. That makes sense, thanks for the response!

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Terms of Use