Reference > Functions reference > Text formatting functions > TextStyleRemove
 

TextStyleRemove

Removes the specified styles from text in a single action.

Format 

TextStyleRemove ( text ; styles )

Parameters 

text - any text expression or text field

styles - any named style from the list of available styles

Data type returned 

text

Originated in 

FileMaker Pro 7.0

Description 

You can remove multiple styles by using the + operator between style names. Negative values are not valid. The Plain styles cannot be used for this function. Plain is ignored if intermingled with other styles. Styles are not case sensitive and do not contain spaces.

An additional style called AllStyles has been provided to make it easier to remove all styles. Text formatting options will be lost if the field type that is returned is something other than text.

The styles that are available are:

Bold

Italic

Underline

HighlightYellow

Condense

Extend

Strikethrough

SmallCaps

Superscript

Subscript

Uppercase

Lowercase

Titlecase

WordUnderline

DoubleUnderline

AllStyles (all available styles)

Example 1 

TextStyleRemove ( "Plaid" ; Italic ) returns the word Plaid with the italics style removed.

Example 2 

TextStyleRemove ( FirstName ; Bold + Underline ) returns Sophie with the bold and underlined styles removed when the FirstName field contains Sophie.

TextStyleRemove ( FirstName ; AllStyles ) returns Sophie without any styles.

Example 3 

TextStyleRemove ( MyTable::MyText ; HighlightYellow )returns the text contained in MyTable::MyText with the HighlightYellow style removed.

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas