February 6, 200619 yr 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, 200619 yr by Guest
February 7, 200619 yr 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 ) ) )
February 7, 200619 yr 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 )
Create an account or sign in to comment