<?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: Problem using IIf in Arcade label expression to check if field is Null in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146771#M51847</link>
    <description>&lt;P&gt;&lt;STRONG&gt;IsEmpty&lt;/STRONG&gt; evaluates to a boolean, and "!" negates a condition, so you can re-write that as&lt;/P&gt;&lt;PRE&gt;Iif(!IsEmpty(name), name, 'landing ground')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But what you're essentially doing is replicating the function &lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/#defaultvalue" target="_blank"&gt;&lt;STRONG&gt;DefaultValue&lt;/STRONG&gt;&lt;/A&gt;. Try this:&lt;/P&gt;&lt;PRE&gt;DefaultValue(name, 'landing ground')&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Feb 2022 23:50:21 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2022-02-22T23:50:21Z</dc:date>
    <item>
      <title>Problem using IIf in Arcade label expression to check if field is Null</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146769#M51846</link>
      <description>&lt;P&gt;Trying to label this feature class on it's Name field. If the Name field is Null then I want to place custom text.&lt;/P&gt;&lt;P&gt;This is what I have:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;var name = $feature.name&lt;/P&gt;&lt;P&gt;IIf(IsEmpty(name) == False, name, 'landing ground')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;But it only seems to label the True part of the statement and not the False, so I see the name, but not the text "landing ground" (image 2).&lt;/P&gt;&lt;P&gt;This seems really basic stuff, so can't work out why it's not working like I think it should.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattSmith6_1-1645573060518.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/34688iB029BD24E8BC31EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattSmith6_1-1645573060518.png" alt="MattSmith6_1-1645573060518.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="MattSmith6_0-1645572891887.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/34687i75AB8F884CBFDBB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattSmith6_0-1645572891887.png" alt="MattSmith6_0-1645572891887.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 23:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146769#M51846</guid>
      <dc:creator>MattSmithCarto</dc:creator>
      <dc:date>2022-02-22T23:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using IIf in Arcade label expression to check if field is Null</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146771#M51847</link>
      <description>&lt;P&gt;&lt;STRONG&gt;IsEmpty&lt;/STRONG&gt; evaluates to a boolean, and "!" negates a condition, so you can re-write that as&lt;/P&gt;&lt;PRE&gt;Iif(!IsEmpty(name), name, 'landing ground')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But what you're essentially doing is replicating the function &lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/#defaultvalue" target="_blank"&gt;&lt;STRONG&gt;DefaultValue&lt;/STRONG&gt;&lt;/A&gt;. Try this:&lt;/P&gt;&lt;PRE&gt;DefaultValue(name, 'landing ground')&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Feb 2022 23:50:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146771#M51847</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-02-22T23:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using IIf in Arcade label expression to check if field is Null</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146784#M51849</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;but that's yielding the exact same result. I'm still missing labels for records with the Null value&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 00:25:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146784#M51849</guid>
      <dc:creator>MattSmithCarto</dc:creator>
      <dc:date>2022-02-23T00:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using IIf in Arcade label expression to check if field is Null</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146785#M51850</link>
      <description>&lt;P&gt;OK, clearly I wasn't awake! I had a SQL limiting which records were being returned. Rookie error.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 00:33:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146785#M51850</guid>
      <dc:creator>MattSmithCarto</dc:creator>
      <dc:date>2022-02-23T00:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using IIf in Arcade label expression to check if field is Null</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146790#M51851</link>
      <description>&lt;P&gt;Ah! That was my next question! Always nice when it's a simple solution.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 00:42:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problem-using-iif-in-arcade-label-expression-to/m-p/1146790#M51851</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-02-23T00:42:44Z</dc:date>
    </item>
  </channel>
</rss>

