<?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: If Then Arcade expression in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93177#M4504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accomoodation&lt;/P&gt;&lt;P&gt;IIf(isEmpty($feature.Accommod_1),"", $feature.Accommod_1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accommodation URL&lt;/P&gt;&lt;P&gt;IIF (isEmpty($feature.Accom_URL),"",$feature.Accom_URL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Working as expected. My problem is having the following occur in the pop-up:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; width: 733px;"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef; height: 25px;"&gt;&lt;TH style="width: 275px; height: 25px;"&gt;Attribute&lt;/TH&gt;&lt;TH style="width: 297px; height: 25px;"&gt;Values&lt;/TH&gt;&lt;TH style="width: 142px; height: 25px;"&gt;No&amp;nbsp;Values&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="height: 25px;"&gt;&lt;TD style="width: 275px; height: 25px;"&gt;Accommodation&lt;/TD&gt;&lt;TD style="text-align: center; width: 297px; height: 25px;"&gt;Yes - Display&lt;/TD&gt;&lt;TD style="text-align: center; width: 142px; height: 25px;"&gt;No - Don't display&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 6px;"&gt;&lt;TD style="width: 275px; height: 6px;"&gt;Accommodation + Accommodation URL&lt;/TD&gt;&lt;TD style="text-align: center; width: 297px; height: 6px;"&gt;Yes for both - Display information and associated URL hyperlink&lt;/TD&gt;&lt;TD style="text-align: center; width: 142px; height: 6px;"&gt;No for both - Don't display&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I 'set' the URL in the pop-up code using the expression and there is no URL for the 'Accommodation' information, a URL back to the webmap creates a blank return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, my Arcade expression and custom pop-up code will be able to show according to the above table if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Craig&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2019 03:04:43 GMT</pubDate>
    <dc:creator>CPoynter</dc:creator>
    <dc:date>2019-09-04T03:04:43Z</dc:date>
    <item>
      <title>If Then Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93175#M4502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have two fields 'accom' and 'accom_url'.&lt;/P&gt;&lt;P&gt;I am trying to write an arcade expression that will check my table to see if 'accom' exists. If empty, then my pop-up will be empty.&lt;/P&gt;&lt;P&gt;If 'accom' exists but not 'accom_url' then 'accom' text will be placed in pop-up.&lt;/P&gt;&lt;P&gt;If 'accom' exists and 'accom_url' exist, then my pop-up will 'accom' text with hyperlink enabled.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Craig&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Aug 2019 23:25:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93175#M4502</guid>
      <dc:creator>CPoynter</dc:creator>
      <dc:date>2019-08-18T23:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93176#M4503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/9445"&gt;Craig Poynter&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at the following post&amp;nbsp;&lt;A href="https://community.esri.com/thread/237247-arcade-expression-ifthen-statement"&gt;https://community.esri.com/thread/237247-arcade-expression-ifthen-statement&lt;/A&gt;&amp;nbsp;which outlines using conditional statements with or/and operators in Arcade. &amp;nbsp;If you post the Arcade code that you have so far, I would be glad to respond with additional guidance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2019 16:22:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93176#M4503</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2019-08-19T16:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93177#M4504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accomoodation&lt;/P&gt;&lt;P&gt;IIf(isEmpty($feature.Accommod_1),"", $feature.Accommod_1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Accommodation URL&lt;/P&gt;&lt;P&gt;IIF (isEmpty($feature.Accom_URL),"",$feature.Accom_URL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Working as expected. My problem is having the following occur in the pop-up:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; width: 733px;"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef; height: 25px;"&gt;&lt;TH style="width: 275px; height: 25px;"&gt;Attribute&lt;/TH&gt;&lt;TH style="width: 297px; height: 25px;"&gt;Values&lt;/TH&gt;&lt;TH style="width: 142px; height: 25px;"&gt;No&amp;nbsp;Values&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="height: 25px;"&gt;&lt;TD style="width: 275px; height: 25px;"&gt;Accommodation&lt;/TD&gt;&lt;TD style="text-align: center; width: 297px; height: 25px;"&gt;Yes - Display&lt;/TD&gt;&lt;TD style="text-align: center; width: 142px; height: 25px;"&gt;No - Don't display&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 6px;"&gt;&lt;TD style="width: 275px; height: 6px;"&gt;Accommodation + Accommodation URL&lt;/TD&gt;&lt;TD style="text-align: center; width: 297px; height: 6px;"&gt;Yes for both - Display information and associated URL hyperlink&lt;/TD&gt;&lt;TD style="text-align: center; width: 142px; height: 6px;"&gt;No for both - Don't display&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I 'set' the URL in the pop-up code using the expression and there is no URL for the 'Accommodation' information, a URL back to the webmap creates a blank return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, my Arcade expression and custom pop-up code will be able to show according to the above table if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Craig&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 03:04:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93177#M4504</guid>
      <dc:creator>CPoynter</dc:creator>
      <dc:date>2019-09-04T03:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93178#M4505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/9445" target="_blank"&gt;Craig&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try something like the following.&amp;nbsp; You will need to adjust the logic, return strings and add any HTML wrapping as needed but gives you an example. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;isEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Accom_Accommod_1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Nothing Found'&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;isEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Accom_URL&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Accommod_1
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Accommod_1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Accom_URL&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;' - '&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/if-then-arcade-expression/m-p/93178#M4505</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2021-12-10T23:34:09Z</dc:date>
    </item>
  </channel>
</rss>

