Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7366 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

I have a problem I'm hoping someone has a solution for with FileMaker 6.

Essentially I'm trying to implement a mail merge type situation where an editable text field contains tokens/markers that later get replaced with other field values from the database.

This editable field contains text of varying styles (some bold, underline, centered, etc.). If I use the Substitute() function:


Insert Calculated Result[select, "fTextField", Substitute(GetField("fTextField"), "%TOKEN1%", GetField("fToken1"))"]

the markers are replaced as expected BUT I lose all of the styled text.

I'm looking for a cross-platform solution (it HAS to run on Mac and Win) that could work in FM 6, with or without plug-ins. I know this all works fine in FM 7 but I'm trying to avoid migrating to FM 7 at the same time unless I have absolutely no other choice.

Ideas anyone?

Posted

Get Filemaker 7 and make sure you get the developer version. Then go to the custom functions area here and look at the FieldSubstitute custom function.

Posted

In FM6, if you have to have different parts of the text styled differently, I think you will have to use real merge fields in a text object. frown.gif

Posted

The Find/Replace function in FMP 6 preserves character formatting. It can be used to merge codes instead of using the Substitute() function. You'll need to copy/paste the template text into a field, then run the Replace script over the text to merge it.

Both of these processes are layout dependent (the fields need to be on the current layout when the copy/paste and Replace steps run).

Posted

Hi Vaughan,

Thanks for the tip. Unfortunately that doesn't get me all the way there as the Copy/Paste script steps blow away the 'centered' formatting on some of the text in the field (the bold, underline, etc. styles come across fine however). The Find/Replace part does work as expected.

Oh well. *So* close. I guess it's on to FM 7...

This topic is 7366 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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