<?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: Conditional Field Display in Pop Ups in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046558#M39435</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gave me an overview of how to use Arcade Expressions and how I wanted to display my data. I think I understand how it works now, I'll just have to do some tweaking but this explanation was greatly appreciated!&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 19:12:11 GMT</pubDate>
    <dc:creator>AmandaBeck</dc:creator>
    <dc:date>2021-04-13T19:12:11Z</dc:date>
    <item>
      <title>Conditional Field Display in Pop Ups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046368#M39429</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I want to use Conditional Field Display with Arcade in my Pop-Ups. I have done all the reading and research I could find, but I can't seem to figure it out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the link to my current map, it is public, showing my current pop ups, as a custom attribute expression I created.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://warrencountyny.maps.arcgis.com/apps/webappviewer/index.html?id=c29ab0ced8fe463e90cf22c7a20c01ca" target="_blank"&gt;https://warrencountyny.maps.arcgis.com/apps/webappviewer/index.html?id=c29ab0ced8fe463e90cf22c7a20c01ca&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You'll notice that in the pop ups, certain amounts are set to 0, this is the value if no value is inputted into the table. There are some locations that won't get certain types of fish, and that's where I would like to have certain things not show in my pop up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Mill Creek, rte 28 bridge downstream 1 mi&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;was stocked with&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;575&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;spring yearling Brook Trout on&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="esriDateValue"&gt;4/9/2021, 1:57 PM&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;58&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;2 year old Brook Trout on&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="esriDateValue"&gt;4/9/2021, 1:57 PM&lt;/SPAN&gt;&lt;/STRONG&gt;. It was also stocked with&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;spring yearling Rainbow Trout on&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;2 year old Rainbow Trout on&amp;nbsp;. There were also&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;fall stock yearling Rainbow Trout stocked on&amp;nbsp;.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;This pop up should only read "Mill Creek, rte 28 bridge downstream 1 mi was stocked with 575 spring yearling Brook Trout on 4/9/2021 and 58 2 year old Brook Trout on 4/9/2021."&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;Here's a different location's pop up as is:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Clendon Brook&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;was stocked with&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;100&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;spring yearling Brook Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="esriDateValue"&gt;4/1/2021, 9:46 AM&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;2 year old Brook Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;. It was also stocked with&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;spring yearling Rainbow Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;2 year old Rainbow Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;. There were also&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="esriNumericValue"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;fall stock yearling Rainbow Trout stocked on&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;This pop up should only read "Clendon Brook was stocked with 100 spring yearling Brook Trout on 4/1/2021."&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;I have tried the IIF() function in Arcade, and have learned how to enter it while configuring the pop up using HTML, but haven't had any luck with coming out with what I actually want people to be able to see in my map.&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Is there someone out there that can help me?&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Thanks so much in advance!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Apr 2021 14:52:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046368#M39429</guid>
      <dc:creator>AmandaBeck</dc:creator>
      <dc:date>2021-04-13T14:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Field Display in Pop Ups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046393#M39430</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86921"&gt;@AmandaBeck&lt;/a&gt;&amp;nbsp;Can you post the arcade script you have so far?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 15:34:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046393#M39430</guid>
      <dc:creator>RickeyFight</dc:creator>
      <dc:date>2021-04-13T15:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Field Display in Pop Ups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046403#M39431</link>
      <description>&lt;P&gt;For each of your fish species, create an Arcade expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// show_fish_species_1
// returns 'inline' if the field is not empty, else 'none'

// If your empty fields are filled with 0, use this
return IIF($feature.FishSpecies1 == 0, 'none', 'inline')
// If your empty fields are empty, use this
return IIF(IsEmpty($feature.FishSpecies1), 'none', 'inline')
// Or just do both
return IIF(IsEmpty($feature.FishSpecies1) || $feature.FishSpecies1 == 0, 'none', 'inline')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit the HTML source of you popup (your example sentences seem a little too complex to do this way, so I remodeled a bit):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{Location} was stocked
&amp;lt;div style="display:{expression/show_brook_trout_1};"&amp;gt;
 with {BrookTrout1} spring yearling Brook Trout on {SurveyDate1},
&amp;lt;/div&amp;gt;
&amp;lt;div style="display:{expression/show_brook_trout_2};"&amp;gt;
 with {BrookTrout2} 2 year old Brook Trout on {SurveyDate2},
&amp;lt;/div&amp;gt;
&amp;lt;div style="display:{expression/show_raibow_trout_1};"&amp;gt;
 with {RainbowTrout1} spring yearling Rainbow Trout on {SurveyDate3},
&amp;lt;/div&amp;gt;
&amp;lt;div style="display:{expression/show_raibow_trout_2};"&amp;gt;
 and with {RainbowTrout2} 2 year old Rainbow Trout on {SurveyDate4},
&amp;lt;/div&amp;gt;
.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you always survey all fish of the same species, you can do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{Location} was stocked
&amp;lt;div style="display:{expression/show_brook_trout};"&amp;gt;
 with {BrookTrout1} spring yearling Brook Trout on {SurveyDate1} and {BrookTrout2} 2 year old Brook Trout on {SurveyDate2}.
&amp;lt;/div&amp;gt;
&amp;lt;div style="display:{expression/show_raibow_trout};"&amp;gt;
It was also stocked with {RainbowTrout1} spring yearling Rainbow Trout on {SurveyDate3} and with {RainbowTrout2} 2 year old Rainbow Trout on {SurveyDate4}.
&amp;lt;/div&amp;gt;
.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The basic idea is simple: put parts of the text in &amp;lt;div&amp;gt; tags and show or hide these (display: inline/none) according to your number fields. Depending on the structure of your surveys and popup sentences, it could get pretty complex.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 15:49:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046403#M39431</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-04-13T15:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Field Display in Pop Ups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046415#M39432</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/40123"&gt;@RickeyFight&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have one yet, I am just starting out. All I have is a custom attribute display of the information I want presented when a pop up is open. My issue is having certain information not show if the data in my table is 0, or not present at all.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my custom attribute display as of now:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{Waterbody}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;was stocked with&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{STY}&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;spring yearling Brook Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{STY_Date}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{ST2Y}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;2 year old Brook Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{ST2Y_Date}&lt;/STRONG&gt;&lt;SPAN&gt;. It was also stocked with&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{RTY}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;spring yearling Rainbow Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{RTY_Date}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{RT2Y}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;2 year old Rainbow Trout on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{RT2Y_Date}&lt;/STRONG&gt;&lt;SPAN&gt;. There were also&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{RTFY}&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;fall stock yearling Rainbow Trout stocked on&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;{RTFY_Date}&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 16:14:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046415#M39432</guid>
      <dc:creator>AmandaBeck</dc:creator>
      <dc:date>2021-04-13T16:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Field Display in Pop Ups</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046558#M39435</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gave me an overview of how to use Arcade Expressions and how I wanted to display my data. I think I understand how it works now, I'll just have to do some tweaking but this explanation was greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 19:12:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-field-display-in-pop-ups/m-p/1046558#M39435</guid>
      <dc:creator>AmandaBeck</dc:creator>
      <dc:date>2021-04-13T19:12:11Z</dc:date>
    </item>
  </channel>
</rss>

