2 Replies Latest reply on Dec 27, 2012 9:05 PM by russbrad

    Interpreting CSS in a layout


      I'm using the solution proposed here: https://fmdev.filemaker.com/message/88823#88823


      Basically I'm using ExecuteSQL to build a list which I then display on a layout. I need to carry formatting through the ExecuteSQL function, but ExecuteSQL strips the formatting. So the suggestion is to convert the formatting to CSS. The CSS tags survive the ExecuteSQL function, but then the field that I've got on my layout displays those tags verbatim, without converting them back to their intended styles!


      Is there any way to interpret CSS in a layout, so the styles are displayed rather than the tags that represent those styles?


      Alternatively, is there a way of building a list on a layout without using ExecuteSQL? The only reason we're using ExecuteSQL is to build the list, so if there's another way to do that, this issue could be avoided. Portals won't work, because the list is appearing inside a portal, and portals can't be nested.

        • 1. Re: Interpreting CSS in a layout

          Hi Russell (?),


          I believe that your sortie into CSS is unnecessary.


          I have used CSS to export formatted text to MS Word, where I used the CSS to let me export the text as HTML, which I could import directly into MS Word, with text formatting intact.  But I don't think you need to venture there.


          There is a difference between portals and relationships. You can't nest portals, but you can use relationships within a portal row.


          So instead of using 'executeSQL' (and losing all your text formatting on the way!), you need to explore the 'List' function.


          For each line in your portal, you can make a relationship from there to the items you wish to list in the portal and then add a field to the table used in your portal with a calc which will look something like:




          (Replace with the real thing - this list can't cope with these characters in an email)


          Put this field in your portal and the list of items you need should begin to appear, with text formatting enact.


          Best wishes - Alan Stirling, London, UK.



          Alan Stirling Technology Ltd, 135 Lisson Grove, London NW1 6UP

          +44 (0) 20 7724 2456 - alan@ast.fm - www.ast.fm.

          FileMaker Certified Developer for versions 7, 8, 9, 10, 11 and 12.

          • 2. Re: Interpreting CSS in a layout

            Worked perfectly, thank you very much!  I wasn't aware List could be used in that way.  That's much more convenient.