Mark DeNyse Posted September 17, 2004 Posted September 17, 2004 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?
bruceR Posted September 18, 2004 Posted September 18, 2004 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.
Ender Posted September 21, 2004 Posted September 21, 2004 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.
Vaughan Posted September 21, 2004 Posted September 21, 2004 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).
Mark DeNyse Posted September 21, 2004 Author Posted September 21, 2004 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...
Recommended Posts
This topic is 7630 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 accountSign in
Already have an account? Sign in here.
Sign In Now