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.

Preserve font styles through a calculation.

Featured Replies

The only way I have ever done it is the way you described above. I only used it in a situation where there would only be a single section of bold text. It's probably a lot of work, but you could set up a merge field like this:

<<plain01>><<bold01>><<plain02>><<bold02>><<plain03>><<bold03>><<plain04>>[ b]<<bold04>><<plain05>> etc.

Then use as many fields as necessary.

[ April 05, 2002, 01:06 PM: Message edited by: BobWeaver ]

Except that FMP can't read HTML codes -- your " ... " idea won't work.

  • Author

I think the point was to use filemaker's text functions to find the html tags and parse the text into individual plain and bold text fields that would then be assembled into one merge field.

I am guessing from Fitch's answer to the post: "Changing format of part of a string" that this can't be done, But I'll ask anyway. I have learnt alot here that I thought couldn't be done.

Let's say 'name', 'sentencetemplate' and 'sentence' are text fields.

Let's say that either through Define Fields or through a script:

sentence is Substitute(sentencetemplate, "**name**", name)

So that if 'sentencetemplate' is "Hi **name**, How are you?", 'sentence' will be "Hi John, How are you?"

Now the question: Is there anyway I can get "John" to print bold (or italics or whatever), when 'sentence' is printed?

The best would be if I could put something like "Hi (:**name**(/:, How are you?" in 'sentencetemplate'. Second best would be if I could put something like "(b)John(/b)" in 'name'. Third best would be to have my 'sentence' calculation be something like:

Substitute(sentencetemplate, "**name**", MakeBold(name))

or

StuffBefore(sentencetemplate,"**name**") & MakeBold(name) & StuffAfter(sentencetemplate,"**name**")

I understand that I could have 'sentencetemplate1st' be "Hi ", and sentencelast be ", How are you?" and put

<<sentencetemplate1st>><<name>><<sentencetemplatelast>> on the layout. But that doesn't work with what else I need to do. I don't know how many **name**'s will be in sentencetemplate. Also I want my print layout to have a single text field which will be filled differently according to which script has filled it.

[ April 05, 2002, 12:54 PM: Message edited by: Drew Cover ]

quote:

Originally posted by BobWeaver:

I think the point was to use filemaker's text functions to find the html tags and parse the text into individual plain and bold text fields that would then be assembled into one merge field.

For example of how to parse HTML in FM and how to format text in custom way see Mark Osborne's teaching tool Form and Form2 at

database pros

Dj

Create an account or sign in to comment

Important Information

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

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.