{"id":11509,"date":"2019-04-15T18:45:23","date_gmt":"2019-04-15T18:45:23","guid":{"rendered":"https:\/\/www.directimpactsolutions.com\/?p=11509"},"modified":"2024-08-06T01:14:51","modified_gmt":"2024-08-06T01:14:51","slug":"displaying-filemaker-data-in-web-viewers","status":"publish","type":"post","link":"https:\/\/www.directimpactsolutions.com\/en\/displaying-filemaker-data-in-web-viewers\/","title":{"rendered":"Displaying FileMaker Data in Web Viewers the Right Way"},"content":{"rendered":"<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1279\" height=\"767\" src=\"https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited.jpg\" alt=\"displaying FileMaker data in web viewers the right way\" class=\"wp-image-11769\" style=\"width:586px;height:351px\" srcset=\"https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited.jpg 1279w, https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-300x180.jpg 300w, https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-1024x614.jpg 1024w, https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-768x461.jpg 768w, https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-600x360.jpg 600w\" sizes=\"auto, (max-width: 1279px) 100vw, 1279px\" \/><\/figure><p>Using a <a href=\"https:\/\/fmhelp.filemaker.com\/help\/16\/fmp\/en\/index.html#page\/FMP_Help\/web-viewers.html\" target=\"_blank\" rel=\"noreferrer noopener\">web viewer<\/a> to display FileMaker data is one of the easiest and most versatile ways to enhance the functionality of your FileMaker app. Implementing this the&nbsp;<em>right<\/em>&nbsp;way is key to making sure your web viewer doesn\u2019t \u201cbreak\u201d down the road.<\/p><h3 class=\"wp-block-heading\"><strong>Displaying Data the Wrong Way<\/strong><\/h3><p>A common way to display data is to use a \u2018Let\u2019 function. We will use one for our example, but it isn\u2019t necessary to accomplish our goal.<\/p><pre class=\"wp-block-code\"><code>Let (&#91;\n\ndata = &#91;your_FileMaker_field_here]\n\n];\n\n\u201cdata:text\/html,\u201d\n\n&amp; \u201c&lt;html&gt;&lt;head&gt;\u201d\n\n&amp; \u201c&lt;style type=\\\u201dtext\/css\\\u201d&gt;\n\nbody {\n\nfont-family: \u2018Arial\u2019 ;\n\nfont-size: .9em ;\n\npadding:0px;  \n\nmargin:0px;\n\nwidth: 100%;\n\n}\n\n    &lt;\/style&gt;&lt;\/head&gt;\u201d\n\n&amp; \u201c&lt;body&gt;\u201d &amp;\n\ndata\n\n&amp; \u201c&lt;\/body&gt;&lt;\/html&gt;\u201d\n\n)\n\n<\/code><\/pre><h3 class=\"wp-block-heading\" style=\"padding-top:var(--wp--preset--spacing--40)\"><strong>The Result:<\/strong><\/h3><p>Your web viewer works! For now that is. Most likely, you will not notice anything wrong right away, until the day a user types a special character (specifically the \u2018#\u2019) into your data source. All of a sudden and seemingly out of nowhere your web viewer will be \u201cbroken\u201d and will no longer display the data correctly.<\/p><h3 class=\"wp-block-heading\"><strong>How to Display Data the Right Way<\/strong><\/h3><p>Luckily, this issue is easily fixed using one additional FileMaker function! To get our data to&nbsp;<a href=\"https:\/\/www.directimpactsolutions.com\/en\/display-executesql-results-in-a-web-viewer\/\">display properly in the web viewer<\/a>, we\u2019ll simple wrap our data source in the \u2018GetAsURLEncoded\u2019 function. This will convert special characters into html friendly text that won\u2019t break your web viewer.<br><\/p><pre class=\"wp-block-code\"><code>Let (&#91;\n\ndata = GetAsURLEncoded ( &#91;your_FileMaker_field_here] )\n\n];\n\n\u201cdata:text\/html,\u201d\n\n&amp; \u201c&lt;html&gt;&lt;head&gt;\u201d\n\n&amp; \u201c&lt;style type=\\\u201dtext\/css\\\u201d&gt;\n\nbody {\n\nfont-family: \u2018Arial\u2019 ;\n\nfont-size: .9em ;\n\npadding:0px;  \n\nmargin:0px;\n\nwidth: 100%;\n\n}\n\n    &lt;\/style&gt;&lt;\/head&gt;\u201d\n\n&amp; \u201c&lt;body&gt;\u201d &amp;\n\ndata\n\n&amp; \u201c&lt;\/body&gt;&lt;\/html&gt;\u201d\n\n)\n\n<\/code><\/pre><h3 class=\"wp-block-heading\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:0;padding-bottom:0;padding-left:0\"><strong>It Works!<\/strong><\/h3><p>This simple modification will ensure that your\u00a0<a href=\"https:\/\/www.directimpactsolutions.com\/en\/displaying-filemaker-data-in-web-viewers\/\">web viewer displays your FileMaker data<\/a> consistently and accurately. \u00a0<\/p><hr class=\"wp-block-separator has-alpha-channel-opacity\" style=\"margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70)\"\/><p class=\"has-small-font-size\"><em>*This article was originally written for AppWorks, which has since joined Direct Impact Solutions. This article is intended for informative purposes only. To the best of our knowledge, this information is accurate as of the date of publication.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Using a web viewer to display FileMaker data is one of the easiest and most versatile ways to enhance the functionality of your FileMaker app. Implementing this the&nbsp;right&nbsp;way is key to making sure your web viewer doesn\u2019t \u201cbreak\u201d down the road. Displaying Data the Wrong Way A common way to display data is to use &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.directimpactsolutions.com\/en\/displaying-filemaker-data-in-web-viewers\/\"> <span class=\"screen-reader-text\">Displaying FileMaker Data in Web Viewers the Right Way<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":6,"featured_media":11769,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","footnotes":""},"categories":[29],"tags":[39,212],"class_list":["post-11509","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-low-code","tag-filemaker","tag-web-viewers"],"uagb_featured_image_src":{"full":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited.jpg",1279,767,false],"thumbnail":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-150x150.jpg",150,150,true],"medium":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-300x180.jpg",300,180,true],"medium_large":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-768x461.jpg",768,461,true],"large":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-1024x614.jpg",1024,614,true],"1536x1536":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited.jpg",1279,767,false],"2048x2048":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited.jpg",1279,767,false],"woocommerce_thumbnail":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-300x300.jpg",300,300,true],"woocommerce_single":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-600x360.jpg",600,360,true],"woocommerce_gallery_thumbnail":["https:\/\/www.directimpactsolutions.com\/wp-content\/uploads\/2023\/05\/Good-vs-Bad-edited-100x100.jpg",100,100,true]},"uagb_author_info":{"display_name":"Direct Impact Solutions","author_link":"https:\/\/www.directimpactsolutions.com\/en\/author\/direct-impact-solutions\/"},"uagb_comment_info":0,"uagb_excerpt":"Using a web viewer to display FileMaker data is one of the easiest and most versatile ways to enhance the functionality of your FileMaker app. Implementing this the&nbsp;right&nbsp;way is key to making sure your web viewer doesn\u2019t \u201cbreak\u201d down the road. Displaying Data the Wrong Way A common way to display data is to use&hellip;","_links":{"self":[{"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/posts\/11509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/comments?post=11509"}],"version-history":[{"count":7,"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/posts\/11509\/revisions"}],"predecessor-version":[{"id":17790,"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/posts\/11509\/revisions\/17790"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/media\/11769"}],"wp:attachment":[{"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/media?parent=11509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/categories?post=11509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.directimpactsolutions.com\/en\/wp-json\/wp\/v2\/tags?post=11509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}