SteveB Posted February 6, 2006 Posted February 6, 2006 (edited) The following 2 script steps work: profession= Case ( PatternCount ( Profession;"¶" ) > 0; TextStyleAdd (Profession ; Bold ); TextStyleRemove (Profession ; Bold ) ) profession= Case ( PatternCount ( Profession;"¶" ) > 0; TextColor (Profession; RGB( 0 ; 0 ;255)); TextColor(Profession; RGB (187 ; 0 ; 0 ))) However, when I try to combine TextStyleAdd with TextColor into a calculation field, it doesn't work. It changes the text to Bold, but it doesn't color it. I've tried various combinations, including 2 case statements, '&' and '+' to no avail. I don't get a syntax error, it just doesn't do it. Does anybody know what the correct syntax is to apply Bold and Color, and the default side to be 'no Bold and black'? Steve Edited February 6, 2006 by Guest
SteveB Posted February 7, 2006 Author Posted February 7, 2006 no, its into a calc field (type of text). Steve
comment Posted February 7, 2006 Posted February 7, 2006 Then you don't need to remove the bold style when the condition is false. The syntax can be: Case ( test ; TextColor ( TextStyleAdd ( text ; Bold ) ; RGB ( 155 ; 0 ; 0 ) ) ; TextColor ( text ; RGB ( 0 ; 0 ; 180 ) ) )
Raybaudi Posted February 7, 2006 Posted February 7, 2006 Does anybody know what the correct syntax is to apply Bold and Color, and the default side to be 'no Bold and black'? If "profession" field is always no bold and black: Case ( PatternCount ( profession; ¶ ) > 0; TextStyleAdd (TextColor (profession; RGB( 0 ; 0 ;255)) ; Bold ); profession )
Recommended Posts
This topic is 6928 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now