Concantenation will work, there is a gotcha, where you end up with 3 or 5 quotes marks to allow the quotes marks to work. The calculated field is messy, unless you have the fields in filemaker, the header, body, footer as separate calculated fields that are used in the final calculation field, or so I found.
Did this half a decade or so ago. It did work. Do not have the database handy to demonstrate.
Just to be on the safe side I tried to wrap 5 quotes """"" on either side of the HTML that I am trying to **package** along with my field information and I still get stuck with "the specified field cannot be found" and it stops on the "text.
My HTML that I am trying to put in the field starts with:
<div style="text-align: center;">
and continues on for quite a bit but this shows the challenge.
I use a calculation field to pull together info to make bookmark file exports I can send to my customers. It looks a bit like this"<!DOCTYPE NETSCAPE-Bookmark-file-1>" & ¶ &"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">" & ¶ &"<TITLE>Bookmarks</TITLE>" & ¶ &"<H1>AUTO LOGINS</H1>" & ¶ &"<DL><p>" & ¶ &"<DT><H3>AUTO LOGINS</H3>" & ¶ &"<DL><p>" & ¶ &"<DT><A HREF=\"" &Case(Account="ACCOUNT 1";"http://www.website.com/storefront/customerLoginVerification.html?Email=" & Contacts::email & "&Password=" & Contacts::password 2 & "\">Auto Login</a></DL></DT>";"http://www.website2.com/storefront/customerLoginVerification.html?Email=" & Contacts::email & "&Password=" & Contacts::password 2 & "\">Auto Login</a></DL></DT>")here are a couple of examples on how to write itNo fields just text:"<div style=\"text-align: center;\">" This will render like <div style="text-align: center;">Note the \ before the " within the quoted text so that the " will get rendered in the export.With fields inside of text:"<div style=\"text-align:" & yourfield::yourtable & ";\">" This will render like <div style="text-align: center;"> if the yourfield::yourtable had center in the field.
The error is due to how you use quotes in your calculation. You are getting text that is "outside" of a a pair of enclosing quotation marks and FileMaker then looks for operators and a reference to a field from a table where you have literal text that you thought was enclosed in quotes but isn't. Note how Marc has used the backslash character to get quotes to be included as quotes as part of the string of concatenated text.
In FileMaker, the following expression:
"Apple = \"Apple\"!"
will return the following text, quotes included:
Apple = "Apple"!