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.

TextStyleAdd Problem

Featured Replies

I can't seem to get the TextStyleAdd function to recognize styles when referenced from a text field, placing the style directly in the function works fine, but referencing a field produces no change.

Am I missing something?

Here's the Calc I'm using basically taken from the example in Help:

TextStyleAdd ( TextStyleAdd ( FormatText::Txt1 ; Plain ) ; FormatText::FontStyle)

Where FormatText::FontStyle is a text field.

The styles are not text strings, they are numbers, the calculation is interpreting them as named constants.

If you play around with it a little, you'll notice:

Plain = 0

SmallCaps = 2

TitleCase = 48

Bold = 256

Italic = 512

etc.

So, when the help example states:

TextStyleAdd( titleField; SmallCaps + TitleCase )

you could instead use:

TextStyleAdd( titleField; 2 + 48 )

as well.

You could make your calculation work the way you'd like by changing it to:

TextStyleAdd ( TextStyleAdd ( FormatText::Txt1 ; Plain ) ; Evaluate( FormatText::FontStyle) )

and Evaluate() will determine the correct style-number from the name given.

  • Author

Shadow, thx for the clarification.

Rod

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.