How to do portals

Support, Tips and Tricks for Proof Group's fmSpark "merge anything" utility for FileMaker Pro.
Posts: 8
Joined: Wed Jan 09, 2013 9:51 am
PostPosted: Thu Jan 10, 2013 8:39 am
How can I create portal type data in fmSpark. I'm sending quotes (which have the details of the contacts looked up from the relevant tables) but my quotes have Items and I need to display them on the quote.

Maybe I'm missing something simple...
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Thu Jan 10, 2013 2:25 pm
Hi,

Anything between the << and >> will be evaluated as a FileMaker function. So while you can't put a portal in an email, you can put a return delimited list of data using the List() function. So in an invoices file, something like

<<List ( InvoiceLineItems::ItemName >>

would show a list of the item names if your related table (the table occurrence you'd base your portal on) was called InvoiceLineItems.

If you haven't used the List() function before look it up in FileMaker's built-in help. It's pretty cool! And while it can only take one field as its parameter, you can create a calc in your portal table that returns the whole "line" you'd like to see in your mail. So in our invoice lines example, you might create a field called "item display" defined as

ItemName & " " & ItemQuantity & " " & "$" & Round ( ItemPrice ; 2 )

Then using that field in List, like

<<List ( InvoiceLineItems::item display>>

would get you something that looks more like a portal.

Hope that helps,

John
John Sindelar
SeedCode
Posts: 8
Joined: Wed Jan 09, 2013 9:51 am
PostPosted: Fri Apr 19, 2013 7:10 am
Hi,

I'm using this method pretty well, but am unable to put concatenated strings with line breaks in them
¶ isn't respected by the HTML conversion process, and of course using a real line carriage return isn't respected by FM. My line items are more than one line, e.g.:

3 * Prod1 @ $0.01 = $0.03
This Product has a description
This Product has Date and location Info
This Product has a URL

7 * Prod 2 @ .....

Any ideas how I'll be able to get my line breaks in?
Regards

Jason
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Tue Apr 23, 2013 11:59 am
Hi Jason,

So there's two areas in FMSpark for text, the Plain Text option and the the HTML Regions. For the Plain Text option, ¶ should work fine, but for the HTML part use <br/>. See below:

TextForHTML.png
TextForHTML.png (158.95 KiB) Viewed 24729 times


Preview.png
Preview.png (85.91 KiB) Viewed 24729 times


Let me know if that helps,
-Jason
Posts: 8
Joined: Wed Jan 09, 2013 9:51 am
PostPosted: Fri Apr 26, 2013 6:36 am
In case anyone is following this thread, Jason very helpfully provided the answer off-line.

Use the FM Substitute function to replace the unsupported '¶' character with the appropriate HTML code for a line break.

<<Substitute ( List (ChildTable::ConcatenatedField) ; ¶ ; "<br/>" )>>

Thanks Jason

PS this also works great with the TextStyleAdd function to enbolden, underline or otherwise add some kind of formatting to the HTML code pulled in from the FM field.

Return to fmSpark

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
support@seedcode.com
Follow us: