<?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: Hide Field in Pop-up in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1330413#M54673</link>
    <description>&lt;P&gt;You can use the &lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_F5CB09E0313A4DA1BD10F18D875FFC3F" target="_self"&gt;Arcade element&lt;/A&gt; to create this. Your Arcade script would look something like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var output =`&amp;lt;b&amp;gt;Begin Width (feet):&amp;lt;/b&amp;gt; ${$feature.BEG_WIDTH} &amp;lt;b&amp;gt;End Width (feet):&amp;lt;/b&amp;gt; ${$feature.END_WIDTH} &amp;lt;br/&amp;gt;
&amp;lt;b&amp;gt;Length (feet):&amp;lt;/b&amp;gt; ${$feature.FEET}&amp;lt;br/&amp;gt;
//etc...
&amp;lt;video controls="" width="100%"&amp;gt;
  &amp;lt;source src="${$feature.VID_LINK_1}" type="video/mp4"&amp;gt;
  Your browser does not support the video tag.
&amp;lt;/video&amp;gt;`;
`;

//add this if function for each other video link

if (!IsEmpty($feature.VID_LINK_2)) {
  output += `&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Video:&amp;lt;/b&amp;gt; 
&amp;lt;video controls="" width="100%"&amp;gt;
  &amp;lt;source src="${$feature.VID_LINK_2}" type="video/mp4"&amp;gt;
  Your browser does not support the video tag.
&amp;lt;/video&amp;gt;`;
}
return { 
  type : 'text', 
  text : output
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2023 21:18:41 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2023-09-19T21:18:41Z</dc:date>
    <item>
      <title>Hide Field in Pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1330137#M54667</link>
      <description>&lt;P&gt;I have data with video link attachments. Some have up to five links associated with them.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aprhyde11_0-1695132158629.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81086i84FA7A1CC6D2C965/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aprhyde11_0-1695132158629.png" alt="aprhyde11_0-1695132158629.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm trying to configure the pop-ups so that, if there is only one video, only one video player will show up.&lt;/P&gt;&lt;P&gt;I've added the following expression via arcade:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aprhyde11_1-1695132268569.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81087i266FDD7ECF281BA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aprhyde11_1-1695132268569.png" alt="aprhyde11_1-1695132268569.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and this is my HTML code. I'm looking at lines 20 and below for the video formatting&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;p&amp;gt;
    &amp;lt;strong&amp;gt;Begin Width (feet): &amp;lt;/strong&amp;gt;{BEG_WIDTH} &amp;amp;nbsp;&amp;lt;strong&amp;gt;End Width (feet): &amp;lt;/strong&amp;gt;{END_WIDTH}&amp;amp;nbsp;
&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;
    &amp;lt;strong&amp;gt;Length (feet): &amp;lt;/strong&amp;gt;{FEET}&amp;amp;nbsp;
&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;
    &amp;lt;strong&amp;gt;PCI: &amp;lt;/strong&amp;gt;{PCI} &amp;amp;nbsp;&amp;lt;strong&amp;gt;Condition: &amp;lt;/strong&amp;gt;{CONDITION}&amp;amp;nbsp;
&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;
    &amp;lt;strong&amp;gt;Treatment:&amp;lt;/strong&amp;gt; {TREATMENT} &amp;amp;nbsp;&amp;lt;strong&amp;gt;Cost: &amp;lt;/strong&amp;gt;{TOTALCOST}&amp;amp;nbsp;
&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;
    &amp;lt;strong&amp;gt;Asphalt Type:&amp;lt;/strong&amp;gt; {TYPE}&amp;amp;nbsp;
&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;
    &amp;lt;strong&amp;gt;Inspection Date:&amp;lt;/strong&amp;gt; {INSPECT_DA}&amp;amp;nbsp;
&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;
&amp;lt;span style="display:{expression/expr0}"&amp;gt;
    &amp;lt;strong&amp;gt;Video: &amp;lt;/strong&amp;gt;&amp;lt;video controls="" width="100%"&amp;gt;
                            &amp;lt;source src="{VID_LINK_1}" type="video/mp4"&amp;gt;
                            Your browser does not support the video tag.
                        &amp;lt;/video&amp;gt; &amp;amp;nbsp;&amp;lt;video controls="" width="100%"&amp;gt;
                            &amp;lt;source src="{VID_LINK_2}" type="video/mp4"&amp;gt;
                            Your browser does not support the video tag.
                        &amp;lt;/video&amp;gt; &amp;amp;nbsp;&amp;lt;video controls="" width="100%"&amp;gt;
                            &amp;lt;source src="{VID_LINK_3}" type="video/mp4"&amp;gt;
                            Your browser does not support the video tag.
                        &amp;lt;/video&amp;gt; &amp;amp;nbsp;&amp;lt;video controls="" width="100%"&amp;gt;
                            &amp;lt;source src="{VID_LINK_4}" type="video/mp4"&amp;gt;
                            Your browser does not support the video tag.
                        &amp;lt;/video&amp;gt; &amp;amp;nbsp;&amp;lt;video controls="" width="100%"&amp;gt;
                            &amp;lt;source src="{VID_LINK_5}" type="video/mp4"&amp;gt;
                            Your browser does not support the video tag.
                        &amp;lt;/video&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;
&amp;lt;/span&amp;gt;
&amp;lt;/p&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code still shows all five video players even if the attribute is blank. I want it to only show one if there is only one video.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a few different iterations of the code but nothing seems to work. I've tried it in AGOL and ArcPro.&lt;/P&gt;&lt;P&gt;Any help is appreciated! Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 14:11:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1330137#M54667</guid>
      <dc:creator>aprhyde11</dc:creator>
      <dc:date>2023-09-19T14:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Field in Pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1330413#M54673</link>
      <description>&lt;P&gt;You can use the &lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_F5CB09E0313A4DA1BD10F18D875FFC3F" target="_self"&gt;Arcade element&lt;/A&gt; to create this. Your Arcade script would look something like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var output =`&amp;lt;b&amp;gt;Begin Width (feet):&amp;lt;/b&amp;gt; ${$feature.BEG_WIDTH} &amp;lt;b&amp;gt;End Width (feet):&amp;lt;/b&amp;gt; ${$feature.END_WIDTH} &amp;lt;br/&amp;gt;
&amp;lt;b&amp;gt;Length (feet):&amp;lt;/b&amp;gt; ${$feature.FEET}&amp;lt;br/&amp;gt;
//etc...
&amp;lt;video controls="" width="100%"&amp;gt;
  &amp;lt;source src="${$feature.VID_LINK_1}" type="video/mp4"&amp;gt;
  Your browser does not support the video tag.
&amp;lt;/video&amp;gt;`;
`;

//add this if function for each other video link

if (!IsEmpty($feature.VID_LINK_2)) {
  output += `&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Video:&amp;lt;/b&amp;gt; 
&amp;lt;video controls="" width="100%"&amp;gt;
  &amp;lt;source src="${$feature.VID_LINK_2}" type="video/mp4"&amp;gt;
  Your browser does not support the video tag.
&amp;lt;/video&amp;gt;`;
}
return { 
  type : 'text', 
  text : output
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 21:18:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1330413#M54673</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-09-19T21:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Field in Pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1330641#M54684</link>
      <description>&lt;P&gt;I keep getting an "Unexpected Token" error on line 13 at the &lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt; of the &amp;lt;br/&amp;gt;. I've tried taking the break out and the Video: line out but then I get an error on line 14 at &lt;STRONG&gt;controls&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 15:34:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1330641#M54684</guid>
      <dc:creator>aprhyde11</dc:creator>
      <dc:date>2023-09-20T15:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Field in Pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1331048#M54698</link>
      <description>&lt;P&gt;I had an error in the code. Remove line 8.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var output =`&amp;lt;b&amp;gt;Begin Width (feet):&amp;lt;/b&amp;gt; ${$feature.BEG_WIDTH} &amp;lt;b&amp;gt;End Width (feet):&amp;lt;/b&amp;gt; ${$feature.END_WIDTH} &amp;lt;br/&amp;gt;
&amp;lt;b&amp;gt;Length (feet):&amp;lt;/b&amp;gt; ${$feature.FEET}&amp;lt;br/&amp;gt;
//etc...
&amp;lt;video controls="" width="100%"&amp;gt;
  &amp;lt;source src="${$feature.VID_LINK_1}" type="video/mp4"&amp;gt;
  Your browser does not support the video tag.
&amp;lt;/video&amp;gt;`;
`; // remove this line&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Sep 2023 14:26:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1331048#M54698</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-09-21T14:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Field in Pop-up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1331117#M54701</link>
      <description>&lt;P&gt;Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 15:49:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hide-field-in-pop-up/m-p/1331117#M54701</guid>
      <dc:creator>aprhyde11</dc:creator>
      <dc:date>2023-09-21T15:49:03Z</dc:date>
    </item>
  </channel>
</rss>

