November 14, 201312 yr Hello, I need to know if a field contains any formatted text (italics, bold, underline, etc.) regardless of its position or content. By searching discussions on this website and others, I have discovered ways to format and unformat selected text and whole fields using various functions, but I have not found a function or script step that will return a "yes" or "no" to the question: does this field contain any formatted text, that is, does it use fonts that are not "regular." Any ideas or suggestions on how to do this? (My experience level is between novice and intermediate, so I apologize if the answer is obvious to more experienced FileMaker users.) Thanks, -Robert.
November 14, 201312 yr You can see the field's formats by looking at the result of GetAsCSS( ) or GetAsSVG( ) function. For example, PatternCount ( GetAsSVG ( "plain text" & YourField ) ; "<Style#1>" ) will return True (1) if the text in the field has any formatting (font, style, color, etc.) applied to it - in part or in whole - False (0) otherwise. I don't think it can sense text alignment, though.
November 14, 201312 yr if you had Advanced I would say a simple custom function and use getasCSS(text) and pattercount to check for "bold","italic", etc.. but you can do it with a script or a calculation field as well let me know if you need more help
Create an account or sign in to comment