Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I would think that you would want to have a series of global fields, e.g. 'textBlock1', 'textBlock2', etc. that you can merge in a calculation to include the Name fields and other specific data. By putting the text into global fields your users can edit the text of the letter without having to redefine the calculations.

Posted

... and I might add that you will probably want to keep the letter as simple as possible. Otherwise your calculation will get very complicated as it might require a series of conditionals

(e.g. 'If not IsEmpty(textBlock2)', result1, result2... etc.)

to deal with minor issues such as empty fields, or even grammatical variations such as plurals.

Posted

I thought of that but it restricts the edit ability of the email.

Maybe they don't want the (name field) in there at all.

Maybe they want the order of the fields to be different.

I know you can do a merge field in a text box in layout mode and I guess I'm trying to figure something like that but in browse mode.....

Posted (edited)

I immediately thought of Ray's demo, Ray Cologon Merge Demo .

But, you mention html. You cannot send html email from FM without a plugin (SMTPit Pro or 360Works are two I've used successfully).

Or, see this Custom Function, From Brian Dunning's Custom Functions

Using SMTPit Pro and maybe the later will work. I'm going home but I tried throwing in Brian's real quick. I got the "?" in my calc field.

I'm wondering if the HTML with it's ", >, < and = is throwing if off....

Thanks for all your help on both topics!

Edited by Guest
Posted (edited)

Using SMTPit Pro and maybe the later will work. I'm going home but I tried throwing in Brian's real quick. I got the "?" in my calc field.

I'm wondering if the HTML with it's ", >, < and = is throwing if off....

Yeah the custom function works fine with straight text but I need to use HTML also.

I wonder if this calc can be adjusted to escape them?

Also checking out the Nightwing stuff.... Did and it's not what I need either.

Edited by Guest
Posted

Ok, so I went with the custom function:

FieldNames2FieldValues ( Text )

http://www.briandunning.com/cf/826

Let ([openMacrosPosition = Position ( Text; "{{" ; 1 ; 1 );       

        closeMacrosPosition = Position ( Text; "}}" ; 1 ; 1 );

        macrosContents = Middle ( Text; openMacrosPosition + 2 ; closeMacrosPosition -  openMacrosPosition - 2);

        replacementText = GetField ( macrosContents );

        res = Replace ( Text ; openMacrosPosition ; closeMacrosPosition - openMacrosPosition + 2 ; replacementText );        

        macroscount = PatternCount ( res ; "{{" )

       ];

        

If ( macroscount=0 ; res; FieldNames2FieldValues (res) )

      )

The use of "{{}}" instead of "<<>>" to specify merge fields allows for the use of HTML in the text field without altering any of the HTML code.

So:

Dear {{buyers name}}

Here's your order info:

Purchase Date: {{purchase date}}

Order # : {{order id}}

Returns a text field with merged data:

Dear {John

Here's your order info:

Purchase Date: 7/15/2008

Order # : 17362659-01

Using SMTPit I can shoot out the emails !

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