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

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

Recommended Posts

  • Newbies
Posted

I need to create a simple runtime application that allows (non-technical) users to create customized HTML template(s) on their own PC for uploading to their own websites.

Basically the user will click through a couple of screens inputing data into fields (their name and contact info, etc). FMP then needs to output the data fields within the context of an HTML-type file template (it's HTML, but it's not an HTML page- it will be uploaded to a content management product so the headers and end tags are removed).

Ideally I would like it so all the end user has to do is a simple "select all" then "cut and paste" from a screen within the runtime application because they aren't sophisticated enough to do anything else. Having FMP output to a txt file is the other alternative.

Unfortuantely I've got the database created but I can't get it to output the end file. Originally I created it so the "output page" was a seperate layout using mail merge. It LOOKS perfect, but I can't do a select all for the cut and paste. It also prints to a printer perfect, but I can't get it to output as a file.

All of my Export attempts create a file of the fields (and not the mail merge layout screen). Even when it comes close the Export adds or reformats things just enough that it damages the HTML file and it doesn't upload correctly. I've been able to print the layout to Acrobat (using Acrobat Pro, not the PDF export feature), but Acrobat isn't an option on my end user's computers (and PDF exporting is turned off for the run time products).

I would prefer not to have to install a "print to text file" print driver which I have found online (but haven't tried yet). Installing anything on the end users PC's makes this problematic. I've just begun experimenting with setting up the HTML template(s) as fields within their own table and using mail merge that way- then having FMP e-mail the file to the users. However it looks to me like all of the "<" and ">" of the html template will keep FMP from merging properly. Troubleshooting this has become just time consuming enough I thought I would stop and ask for help before I dedicated more time to it.

Does anyone have any suggestions or fixes? Is this just impossible to get FMP to do? I'm using the 30 day demo of 9 (I own 8.5) and if it works I'll be upgrading to 9 Advanced to make the runtime.

Posted

Create a calc'field gathering all the fields values as well as the needed surroundings of html'ish gestures, and make this:

http://www.filemaker.com/help/02-Adding%20and%20view15.html

--sd

  • Newbies
Posted

I've tried the calculation field already.

The problem is it sticks on the first "<" of the html code and then gives me the error message "A number, text constant, field name or "(" is expected here." I set up the result to be text but I'm pretty sure it's going to have the same problem no matter what. Basically it's trying to read the html code as it's own calculation code (because they use the same symbols).

The template is several pages of "

I figured I could slice up the html code in fields located in another table and then string them together with the data fields. But I still can't get it to do a clean export without commas, tabs, or formatting of some kind which is why I was going to see if I could get it all back in one field via the calculation field. So far, no dice. I haven't read up on containers yet (they're new to me). Not sure if there's a solution there.

Thanks for the help though!

Posted (edited)

That message is often what you get when you don't have your quote marks correct. You would have to escape any quote marks within the html page (that you want to end up ON the web page).

"

Do this to an HTML template outside of FileMaker first, in a text editor.

As far as Exporting, isolate the record, say with a New Window, found set of 1. Export 1 field. Then you can export as tabbed text, with chosen encoding.

Export Field Contents would seem an obvious choice, except it only exports as UTF-16, which chokes current web browers (AFAIK).

Edited by Guest
Posted

Basically the user will click through a couple of screens inputing data into fields (their name and contact info, etc). FMP then needs to output the data fields within the context of an HTML-type file template (it's HTML, but it's not an HTML page- it will be uploaded to a content management product so the headers and end tags are removed).

Set up a template field that holds template HTML code with <> <> style merge tags.

Then all you have to do is take your field and go:


Substitute( HTMLTemplate ; ["<>" ; FirstNameField] ; ["<>" ; LastNameField] )

etc. etc. Plus as an additional benefit, if you don't hard code the html (besides the obvious benefit there), you don't have to escape out each of the individual: " manually.

Alternatively, you can enclose your code in the following tags, click okay, open the dialog back up again, and all your " should be escaped:

/* Code Here */

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