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...
How to do portals
5 posts
• Page 1 of 1
Posts: 8
Joined: Wed Jan 09, 2013 9:51 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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 |
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 |
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: Let me know if that helps, -Jason |
|
Posts: 8
Joined: Wed Jan 09, 2013 9:51 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. |
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests