Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Determining if a Field Contains any Formatted Text

Featured Replies

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.

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.

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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.