New Function GetAsStyledText ( cssText )

Idea created by alecgregory on Dec 1, 2016
    Active
    Score12

    GetAsCSS is a useful function, but it would be much more powerful twinned with a GetAsStyledText function that converts the CSS back to FileMaker text.

     

    There have been attempts to add this functionality via custom functions, but none of these functions can be exhaustive and performance is an issue on top of the usual custom function caveats.

     

    Two example use cases for this are below.

     

    1. Data exchange between FileMaker systems when Export as FileMaker is not available

    A method to quickly exchange data between FileMaker systems is to export data from the source file and then import it into the destination file. This is most useful when Exported in FileMaker format, as this preserves text formatting. However, FileMaker Server and FileMaker Go cannot export files in FileMaker format. The GetAsCSS and potential GetAsStyledText functions could work around this. Fields that may have formatting that we want to retain could have a CSS version that could be exported in plain text. It could then be converted back to styled text after the import using GetAsStyledText

    2. Retaining Formatting in ExecuteSQL calls

    The same approach as above could be used when moving data using the ExecuteSQL function. This would allow sync products that rely on ExecuteSQL to handle formatted text, in a similar way they do now with images, which can be handled in ExecuteSQL provided there is a Base64 version available.