Jump to content

Merge Fields: Need to get << >> text to appear


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

Recommended Posts

I have a situation where I have multiple letter options, in other words, based on a individuals certain medical criteria, they will get a specific letter. Within each letter there are four to five customized paragraphs. For example, one for Cholesterol, one for HDL etc..etc..

I have developed a table of all the possible paragraphs and related them back to the main contact table and created the fields necessary in the main contact table to capture the right paragraphs. HERE'S THE TROUBLE. Within the paragraphs, I need to personalize here and there eg..<<Fname>> or <<datebloodtest>> etc.. This will only show if I paste directly onto layout in layout mode and then display in Browse Mode.

So, what can I do? Can I force the application into layout mode via a script to paste the text or is there another way of getting these merge fields to appear within the body of these paragraphs.

Thanks for any assistance

Chris

Link to comment
Share on other sites

Hello:

You can make the body of your letter a calc field that substitutes your <<merge fields>> in a global field for the actual content. For example:

Assume you have a letter and you want to put the person's blood pressure in there. Blood pressure should be a field (I'll call it BloodPress). Make a global field that has the body of your letter complete with the <<BloodPress>> (I'll call it LetterBody). The content of LetterBody will look something like this:

Dear John:

During your last check-up, your blood pressure was <<BloodPress>>. Blah, blah, blah, blah...

Sincerely,

Blah, blah.

Then make a calc field:

Field LetterCalc=

Substitute (LetterBody, "<<BloodPress>>", "BloodPress")

It will replace the text string <<BloodPress>> with the actual content of BloodPress field. So it will look like:

Dear John:

During your last check-up, your blood pressure was 150/96. Blah, blah, blah blah

You get the idea. You can also nest substitute operations. I hope this makes sense.

Ken

Link to comment
Share on other sites

One more question though, did what you described and that works great. But how do I substitute multiple fields within the body of the letter. In other words, in one paragraph I might have <<fname>> and <<date_blood>>.

Link to comment
Share on other sites

In my opinion, it would be easier to just nest the substitutions. I'm not at a computer that has FM right now so this might not be totally accurate, but it would look something like this:

Substitute(Substitute(LetterBody, "<<fname>>", fname) "<<date_blood>>", date_blood))

You could do this to sub a lot of text.

Ken

Link to comment
Share on other sites

This topic is 7817 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.