<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Survey123 JavaScript Function Styling the Output in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-javascript-function-styling-the-output/m-p/1083938#M36176</link>
    <description>&lt;P&gt;Just include some HTML styling in the output string.&lt;/P&gt;&lt;P&gt;If you want the whole thing reduced, you can just stick &lt;STRONG&gt;&amp;lt;p style="font-size:10px"&amp;gt;&lt;/STRONG&gt; at the beginning of your &lt;STRONG&gt;OIDS&lt;/STRONG&gt; string. Or if you want, you can add more than one HTML tags in different places in your output string to give the text some variation.&lt;/P&gt;&lt;PRE&gt;&amp;lt;p style="font-size:30px"&amp;gt;This is a paragraph.&amp;lt;/p&amp;gt; &amp;lt;p style="font-size:11px"&amp;gt;This is another paragraph.&amp;lt;/p&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1627566365049.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19643i984207CAABA289CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1627566365049.png" alt="jcarlson_0-1627566365049.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And lastly, because it appears that you're trying to output a table of sorts, you &lt;EM&gt;can&lt;/EM&gt; attempt to use the HTML &amp;lt;table&amp;gt; tags in S123, though you don't have nearly as much control over how they display.&lt;/P&gt;&lt;PRE&gt;&amp;lt;table style="padding:5px; border:1px solid black; border-spacing:5px;"&amp;gt;&amp;lt;tr style="font-size:38px"&amp;gt;&amp;lt;td&amp;gt;Header 1 &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Header 2 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr style="font-size:24px"&amp;gt;&amp;lt;td&amp;gt;Some value&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Another value&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr style="font-size:8px"&amp;gt;&amp;lt;td&amp;gt;Next row&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Last cell&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Note how the padding and border styling on the &amp;lt;table&amp;gt; tag is ignored. But text styling per row is possible.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1627567049365.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19646i832121F38DA898E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1627567049365.png" alt="jcarlson_1-1627567049365.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2021 13:57:35 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-07-29T13:57:35Z</dc:date>
    <item>
      <title>Survey123 JavaScript Function Styling the Output</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-javascript-function-styling-the-output/m-p/1083887#M36172</link>
      <description>&lt;P&gt;Hi All&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After Much toing and frowing i have manage to create this JavaScript function that shows a list of equipment and weather or not it has been inspected in the last week, indicated by a green tick box or red cross.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is while it looks great on the desktop version of Connect when I publish it&amp;nbsp; ,it looks a mess on some smaller android devices. I was thinking if I could&amp;nbsp; reduced the size of the font it might look better on devices with a smaller screen. I cannot figure out how to do this though. is it possible? or is there another solution I could use to help it look better on smaller devices&lt;/P&gt;&lt;P&gt;Kind regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul Sweeney&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    xmlhttp.open("GET",url,false);
        xmlhttp.send();
        
        
        
            var responseJSON=JSON.parse(xmlhttp.responseText);
            var OIDS = "Serial Number "+ "- Description -"+ "- Last Inspection Date -"+"\n"+"\n";
            
            var outputdatecheck = " "
            var i;
            for (i in responseJSON.features) {
                var date = new Date();
                date.setDate(date.getDate() - 7);
if(new Date(responseJSON.features[i].attributes.HSF_051_Inspection_Date) &amp;gt; date) {
 outputdatecheck = "\u2705";
 } else {
  outputdatecheck = "\u274C";
 }
                OIDS +=  "\n\u2022 ("+((JSON.stringify(responseJSON.features[i].attributes.SERIAL_NUMBER)+") - "+JSON.stringify(responseJSON.features[i].attributes.DESCRIPTION)+" - "+ outputdatecheck+" "+new Date(responseJSON.features[i].attributes.HSF_051_Inspection_Date).toLocaleDateString("en-UK")+"\n").replace(/"/g, '').replace("01/01/1999", " (no weekly inspection record)").replace("01/01/1970", " (no weekly inspection record)"));
              }

            return OIDS
            
          }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 11:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-javascript-function-styling-the-output/m-p/1083887#M36172</guid>
      <dc:creator>PaulSweeney3</dc:creator>
      <dc:date>2021-07-29T11:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 JavaScript Function Styling the Output</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-javascript-function-styling-the-output/m-p/1083938#M36176</link>
      <description>&lt;P&gt;Just include some HTML styling in the output string.&lt;/P&gt;&lt;P&gt;If you want the whole thing reduced, you can just stick &lt;STRONG&gt;&amp;lt;p style="font-size:10px"&amp;gt;&lt;/STRONG&gt; at the beginning of your &lt;STRONG&gt;OIDS&lt;/STRONG&gt; string. Or if you want, you can add more than one HTML tags in different places in your output string to give the text some variation.&lt;/P&gt;&lt;PRE&gt;&amp;lt;p style="font-size:30px"&amp;gt;This is a paragraph.&amp;lt;/p&amp;gt; &amp;lt;p style="font-size:11px"&amp;gt;This is another paragraph.&amp;lt;/p&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1627566365049.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19643i984207CAABA289CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1627566365049.png" alt="jcarlson_0-1627566365049.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And lastly, because it appears that you're trying to output a table of sorts, you &lt;EM&gt;can&lt;/EM&gt; attempt to use the HTML &amp;lt;table&amp;gt; tags in S123, though you don't have nearly as much control over how they display.&lt;/P&gt;&lt;PRE&gt;&amp;lt;table style="padding:5px; border:1px solid black; border-spacing:5px;"&amp;gt;&amp;lt;tr style="font-size:38px"&amp;gt;&amp;lt;td&amp;gt;Header 1 &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Header 2 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr style="font-size:24px"&amp;gt;&amp;lt;td&amp;gt;Some value&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Another value&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr style="font-size:8px"&amp;gt;&amp;lt;td&amp;gt;Next row&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Last cell&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Note how the padding and border styling on the &amp;lt;table&amp;gt; tag is ignored. But text styling per row is possible.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1627567049365.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19646i832121F38DA898E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1627567049365.png" alt="jcarlson_1-1627567049365.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 13:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-javascript-function-styling-the-output/m-p/1083938#M36176</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-07-29T13:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 JavaScript Function Styling the Output</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-javascript-function-styling-the-output/m-p/1084013#M36181</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response i managed ot get it to work although its not&amp;nbsp; exactly as per your instructions for example to get it to recognise the HTML tags I had to use&amp;nbsp;&lt;/P&gt;&lt;P&gt;OIDS += "&amp;lt;p style=\u0022font-size:8px\u0022&amp;gt;\n\u2022 ......................&lt;/P&gt;&lt;P&gt;but unfortunately&amp;nbsp; it appears the HTML formatting is not working on my android device. The windows version of the field app supports it but my android device does not. is this expected ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 15:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-javascript-function-styling-the-output/m-p/1084013#M36181</guid>
      <dc:creator>PaulSweeney3</dc:creator>
      <dc:date>2021-07-29T15:26:39Z</dc:date>
    </item>
  </channel>
</rss>

