<?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 Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134975#M43827</link>
    <description>&lt;P&gt;You have to use an expression that returns values that will show or hide the div. Just returning True or False won't suffice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;IIF($feature.probtype == "Dead animal"), "inline", "None")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 15:33:44 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2022-01-19T15:33:44Z</dc:date>
    <item>
      <title>Conditional Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134745#M43815</link>
      <description>&lt;P&gt;Hello. I am new to Arcade and my current task is to hide or show an attribute field and value if another field in the same table meets a condition. I am wondering if I can create an expression to do so. I have seen some examples in Field Maps, but not in AGOL or Portal.&lt;/P&gt;&lt;P&gt;For starters the layer I am using in my map is a hosted feature layer view with configured domain values. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Example. If the field ProblemType =’s the views domain value of ‘Dead animal’ then show Location on Road field and its value in pop up. If it does not = ‘Dead animal’ then hide.&lt;/P&gt;&lt;P&gt;A couple thoughts. &amp;nbsp;I know I can create an expression to hide or show the field I want the condition for. Easy right.&lt;/P&gt;&lt;P&gt;IIF(ProbType == "Dead Animal", "inline", "None")&lt;/P&gt;&lt;P&gt;But how do I add another field, the one I want to actually hide/show ($feature.locroad) into this statement or another type of logic to accomplish my task? &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 19:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134745#M43815</guid>
      <dc:creator>RyanR</dc:creator>
      <dc:date>2022-01-18T19:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134786#M43817</link>
      <description>&lt;P&gt;Can you elaborate a bit? The expression you've shared could be used anywhere in your popup text to show/hide not just a field value, but entire HTML elements.&lt;/P&gt;&lt;P&gt;For instance, this HTML in your popup would display the &lt;STRONG&gt;locroad&lt;/STRONG&gt; field based on an expression, but the expression itself could evaluate against &lt;EM&gt;anything&lt;/EM&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div style="display:{expression/expr0}"&amp;gt;{locroad}&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Can you share the full expression you've got so far, or the popup's source HTML code?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 20:57:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134786#M43817</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-01-18T20:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134824#M43820</link>
      <description>&lt;P&gt;Thanks for replying Josh and good question. I have not really come up with an expression at this time other than what I have already stated.&amp;nbsp;In the grand scheme of things I am trying to modify some existing HTML pop up code that is included in Esri Citizen Problem Reporter app:&amp;nbsp;&lt;/P&gt;&lt;P&gt;{category} problem reported on {CreationDate}.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;BR /&gt;&amp;lt;b&amp;gt;Details:&amp;lt;/b&amp;gt; {details}&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;BR /&gt;&amp;lt;b&amp;gt;Status:&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;BR /&gt;&amp;lt;table style="border-collapse: separate; border-spacing: 2px 4px; width: 100%; table-layout: fixed; margin: 0px -2px; max-width: 350px;"&amp;gt;&lt;BR /&gt;&amp;lt;tbody&amp;gt;&amp;lt;tr height="16"&amp;gt;&lt;BR /&gt;&amp;lt;td style="{expression/expr0}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td style="{expression/expr1}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td style="{expression/expr2}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td style="{expression/expr3}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;/tr&amp;gt;&lt;BR /&gt;&amp;lt;tr height="24" style="text-align: center;"&amp;gt;&lt;BR /&gt;&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;Submitted&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;Received&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;In Progress&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;Completed&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;/tr&amp;gt;&lt;BR /&gt;&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&lt;BR /&gt;&amp;lt;table style=" border-collapse: separate; border-spacing: 0px 0px; width: 100%; table-layout: fixed; margin: 0px -1px;"&amp;gt;&lt;BR /&gt;&amp;lt;tbody&amp;gt;&amp;lt;tr&amp;gt;&lt;BR /&gt;&amp;lt;td style="display:{expression/expr4}; text-align: left; width: 100%"&amp;gt;&lt;BR /&gt;&amp;lt;b&amp;gt;&amp;lt;br /&amp;gt;Resolved On:&amp;lt;/b&amp;gt; {resolutiondt}&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;BR /&gt;&amp;lt;b&amp;gt;Resolution:&amp;lt;/b&amp;gt; {resolution}&lt;BR /&gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;/tr&amp;gt;&amp;lt;/tbody&amp;gt;&lt;BR /&gt;&amp;lt;/table&amp;gt;&lt;/P&gt;&lt;P&gt;So I would like to add the &lt;STRONG&gt;locroad&amp;nbsp;&lt;/STRONG&gt;field and formatting preferably above the Resolved On field and only show it when it meets this expression:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanR_3-1642544884777.png" style="width: 260px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31755i73046676D47012C0/image-dimensions/260x26?v=v2" width="260" height="26" role="button" title="RyanR_3-1642544884777.png" alt="RyanR_3-1642544884777.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanR_7-1642547357722.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31762iF9F084E33193EC04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanR_7-1642547357722.png" alt="RyanR_7-1642547357722.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I added your suggested HTML modified with my expression:&lt;/P&gt;&lt;P&gt;&amp;lt;div style="display:{expression/expr5}"&amp;gt;&amp;lt;b&amp;gt;Location on Road:&amp;lt;/b&amp;gt; {locroad}&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;It adds the locroad field, but is not hiding it based on the conditional expression. For example it is showing it for another probtype =&amp;nbsp;&lt;EM&gt;Graffiti painted on a county asset. &lt;/EM&gt;This is a condition when I would like to hide it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanR_6-1642546600755.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31759i0C27EBAAC46672EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanR_6-1642546600755.png" alt="RyanR_6-1642546600755.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the correct behavior for Dead animal and the only case when I want &lt;STRONG&gt;Location on Road: &amp;lt;domain value&amp;gt; &lt;/STRONG&gt;to show in the pop up. For any other domain value I don't want to show it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanR_5-1642546098116.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31758i22BC8578D8259A7E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanR_5-1642546098116.png" alt="RyanR_5-1642546098116.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 23:09:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134824#M43820</guid>
      <dc:creator>RyanR</dc:creator>
      <dc:date>2022-01-18T23:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134837#M43821</link>
      <description>&lt;P&gt;Sure thing, although it gets a bit complex. I think what I am trying to achieve may be simple, but the current HTML code is as follows and is included with the esri Citizen Problem Reporter application which I am trying to customize.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{category} problem reported on {CreationDate}.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;
&amp;lt;b&amp;gt;Details:&amp;lt;/b&amp;gt; {details}&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;
&amp;lt;b&amp;gt;Status:&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;
&amp;lt;table style="border-collapse: separate; border-spacing: 2px 4px; width: 100%; table-layout: fixed; margin: 0px -2px; max-width: 350px;"&amp;gt;
  &amp;lt;tbody&amp;gt;&amp;lt;tr height="16"&amp;gt;
    &amp;lt;td style="{expression/expr0}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td style="{expression/expr1}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td style="{expression/expr2}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td style="{expression/expr3}; text-align: center; width: 25%"&amp;gt;&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
  &amp;lt;tr height="24" style="text-align: center;"&amp;gt;
 	&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;Submitted&amp;lt;/td&amp;gt;
 	&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;Received&amp;lt;/td&amp;gt;
 	&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;In Progress&amp;lt;/td&amp;gt;
 	&amp;lt;td style="text-align: center; width: 25%; font-weight: normal; padding-left: 0px; word- wrap: break-word;"&amp;gt;Completed&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;
&amp;lt;table style=" border-collapse: separate; border-spacing: 0px 0px; width: 100%; table-layout: fixed; margin: 0px -1px;"&amp;gt;
  &amp;lt;tbody&amp;gt;&amp;lt;tr&amp;gt;
	&amp;lt;td style="display:{expression/expr4}; text-align: left; width: 100%"&amp;gt;
	  &amp;lt;b&amp;gt;&amp;lt;br /&amp;gt;Resolved On:&amp;lt;/b&amp;gt; {resolutiondt}&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;
	  &amp;lt;b&amp;gt;Resolution:&amp;lt;/b&amp;gt; {resolution}&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;
	&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;&amp;lt;/tbody&amp;gt;
&amp;lt;/table&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I would like to add the field &lt;STRONG&gt;locroad &lt;/STRONG&gt;and formatting. I only want&amp;nbsp;&lt;STRONG&gt;locroad &lt;/STRONG&gt;to show if the probtype == "Dead animal" If not, I do not want&amp;nbsp;&lt;STRONG&gt;locroad&lt;/STRONG&gt; to show.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created an expression DeadAnimal[expression/expr5) for the condition:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;$feature.probtype == "Dead animal";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then I simply modified and added your HTML idea:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;lt;div style="display:{expression/expr5}"&amp;gt;{locroad}&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;While this added the&amp;nbsp;&lt;STRONG&gt;locroad&lt;/STRONG&gt;&amp;nbsp;to the pop up, it is not evaluating the expression showing the &lt;STRONG&gt;locroad &lt;/STRONG&gt;field and formatting&amp;nbsp;for a&amp;nbsp;&lt;STRONG&gt;probtype &lt;/STRONG&gt;that is not "Dead animal"&lt;STRONG&gt;.&amp;nbsp; &lt;/STRONG&gt;In this case I do not want the&amp;nbsp;locroad field to show because it is a different porbtype (Graffiti painted on county asset)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanR_0-1642549358350.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/31766iFCA7C4D85CCBFCC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanR_0-1642549358350.png" alt="RyanR_0-1642549358350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this provides some clarification.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 23:48:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134837#M43821</guid>
      <dc:creator>RyanR</dc:creator>
      <dc:date>2022-01-18T23:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134975#M43827</link>
      <description>&lt;P&gt;You have to use an expression that returns values that will show or hide the div. Just returning True or False won't suffice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;IIF($feature.probtype == "Dead animal"), "inline", "None")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 15:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1134975#M43827</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-01-19T15:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1135089#M43830</link>
      <description>&lt;P&gt;Good point and thanks. A fresh head this am, some good coffee, and a dive into the documentation provided me with what I needed for success. Simple once I understood proper syntax of function.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var deadanimal = $feature.probtype == "DEAD ANIMAL";
var roadloc = $feature.locroad;
IIf(deadanimal, roadloc, "None");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Now to see if this will work in Citizen Problem Reporters built in from, which I believe behaves based on pop up configuration.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 19:39:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1135089#M43830</guid>
      <dc:creator>RyanR</dc:creator>
      <dc:date>2022-01-19T19:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Visibility w/ Arcade in AGOL – Show/hide pop up field based on attribute value in another field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1158349#M45164</link>
      <description>&lt;P&gt;&lt;EM&gt;Hi, could this be done with a *group* of fields? Also in the context of a Field Maps. I'm struggling with how to include the code for the group since it doesn't show up as a 'Globals' option like the individual fields. Thanks!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solved:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hi all, this has been solved by a coworker of mine. Using Arcade syntax preview, the script applied to the *group* of fields was: DomainName($feature, "ARTIFACTS") == "YES"&lt;/P&gt;&lt;P&gt;This results in the group being hidden in the Field Maps form unless YES is selected.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 20:35:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/conditional-visibility-w-arcade-in-agol-show-hide/m-p/1158349#M45164</guid>
      <dc:creator>RhondaE</dc:creator>
      <dc:date>2022-03-28T20:35:44Z</dc:date>
    </item>
  </channel>
</rss>

