<?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: VBScript Label Expression ArcGIS Pro Fail in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/vbscript-label-expression-arcgis-pro-fail/m-p/1304835#M70735</link>
    <description>&lt;P&gt;Argh! Lol. So frustrating! THANK YOU! It's a learning process for sure.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2023 12:43:11 GMT</pubDate>
    <dc:creator>JosephPilkington1</dc:creator>
    <dc:date>2023-06-30T12:43:11Z</dc:date>
    <item>
      <title>VBScript Label Expression ArcGIS Pro Fail</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vbscript-label-expression-arcgis-pro-fail/m-p/1304633#M70726</link>
      <description>&lt;P&gt;Tried my best at a VBScript label expression in ArcGIS Pro. The expression is 'valid', but the results are that nothing labels at all. Basically, I want my address points to only label with the [Address] field, when [Building] and [Unit] are both null. If [Building] is not null, but [Unit] is null, I want the label to display the [Address] followed on the next line by the [Building]. If [Unit] is not null, but [Building] is null, I want the label to display the [Address] followed on the next line by the [Unit]... if that makes sense.&lt;/P&gt;&lt;P&gt;I appreciate any help! My function is written as&amp;nbsp; follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Function FindLabel ( [Address], [Building], [Unit] )&lt;/P&gt;&lt;P&gt;If (IsNull[Unit]) And (IsNull[Building]) Then&lt;BR /&gt;FindLabel = [Address]&lt;/P&gt;&lt;P&gt;ElseIf (Not IsNull[Building]) And (IsNull[Unit]) Then&lt;BR /&gt;FindLabel = [Address] + vbNewLine + [Building]&lt;/P&gt;&lt;P&gt;ElseIf (IsNull[Building]) And (Not IsNull[Unit]) Then&lt;BR /&gt;FindLabel = [Address] + vbNewLine + [Unit]&lt;/P&gt;&lt;P&gt;End If&lt;BR /&gt;End Function&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 19:20:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vbscript-label-expression-arcgis-pro-fail/m-p/1304633#M70726</guid>
      <dc:creator>JosephPilkington1</dc:creator>
      <dc:date>2023-06-29T19:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript Label Expression ArcGIS Pro Fail</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vbscript-label-expression-arcgis-pro-fail/m-p/1304702#M70729</link>
      <description>&lt;P&gt;There's a problem where the validator is not catching the errors where you are leaving off parentheses in the IsNull functions. Instead of "IsNull[Unit]", it should be "IsNull([Unit])"&lt;/P&gt;&lt;P&gt;Your code should look like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Function FindLabel ( [Address], [Building], [Unit] )
  If (IsNull([Unit])) And IsNull([Building])) Then
    FindLabel = [Address]
  ElseIf (Not(IsNull([Building])) And IsNull([Unit])) Then
    FindLabel = [Address] + vbNewLine + [Building]
  ElseIf (IsNull([Building]) And Not(IsNull([Unit]))) Then
    FindLabel = [Address] + vbNewLine + [Unit]
  End If
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 21:47:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vbscript-label-expression-arcgis-pro-fail/m-p/1304702#M70729</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-06-29T21:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript Label Expression ArcGIS Pro Fail</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/vbscript-label-expression-arcgis-pro-fail/m-p/1304835#M70735</link>
      <description>&lt;P&gt;Argh! Lol. So frustrating! THANK YOU! It's a learning process for sure.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 12:43:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/vbscript-label-expression-arcgis-pro-fail/m-p/1304835#M70735</guid>
      <dc:creator>JosephPilkington1</dc:creator>
      <dc:date>2023-06-30T12:43:11Z</dc:date>
    </item>
  </channel>
</rss>

