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

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

Recommended Posts

  • Newbies
Posted

Hi I'm pretty novice at FileMaker but have as solution pretty much operational internally.  

My company is all based on running bookings with external clients and provider all through email. 

Currently it's all done manually the admin assistant copies the booking from the booking sheet to a email templat in a table and then sends this out one table to the client, another to the provider of which there can be many.  

The bookings are trotted up in a portal on the clients page with a new line for each product.  Can I export the portal to a html table to email out generating a new table row for each matching portal row?

I presume I'm not the only one generating lists of items for email but can't get a handle on how to achieve this without a fixed table and substitution line by line have looked through all the documentation I can find  

Assistance greatly appreciated

 

Posted

Christopher,

I'm not sure I understand your question in its entirety - but it sounds like string concatenation is what you're looking for. In this sort of scenario, I would have two HTML strings - one is the content before the table and the table head, and the other is the table close, footer, rest of the email. I would then loop over your portal and append each row and column as your going through.

For example, a very basic HTML email with a table may look like this on the first portion:

<html>
  <body>
    To Whom It May Concern, this is an example.<br/>
    <table>
      <thead>
        <tr>
          <th>Column 1</th>
          <th>Column 2</th>
        </tr>
      </thead>
      <tbody>

And then you would loop over the rows you want, for each loop you'd append a table row and the table data.

Set Variable [ $html ; "<html>..." ] //the full half of the HTML before the table
Go to Record (First)
Loop
    Set Variable [ $html ; $html & "<tr><td>" & Table::Column1 & "</td><td>" & Table::Column2 & "</td></tr>" ]
    Go to Record(Next; Exit after last)
End Loop
Set Variable [ $html ; $html & "</html>..." ] //the footer, or last portion

Then the last portion would like like:

      </tbody>
    </table>
  </body>
</html>

 

That sort of approach may fit the bill for you. Keep in mind I haven't tested it or anything, so just use it as an example to reach what you're trying to accomplish.

  • Newbies
Posted (edited)

Thanks for the reply 

 

Arrived at something very similar. I didn't clock that I could append the code to a variable so have been writing the code into a field. I will move to your suggestion much neater.  

 

Is there a way to preview and edit the email before actually sending built in. I've been torn between copying it into drafts in the imap server so I can open it from there  before sending or having a pop up to edit before sending. Though it would I presume the pop up would be displayed as raw html code.  

 

Thans again chris 

Edited by Vicky Whibley
Spelling was awful in first attempt
Posted

Vicky,

You can use a web viewer to preview the HTML for your email. Set the custom address to the following:

"data:text/html," & $html

You could have a button that pops up an HTML preview or a dynamically updating one. I would recommend the former for performance concerns.

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