<?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 Help with Conditional Labeling in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-conditional-labeling/m-p/329453#M14381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am having some trouble with conditional label formatting and am hoping someone can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like is for the labels to contain the point name along with lead concentrations that are highlighted when above 80. This VBScript seems to work fine:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Function FindLabel ( [SoilBoring.ID] , [Sheet1$.Lead]) &lt;BR /&gt;FindLabel = ("&amp;lt;FNT size = '8'&amp;gt;&amp;lt;BOL&amp;gt;" + [SoilBoring.ID] + "&amp;lt;/BOL&amp;gt;&amp;lt;/FNT&amp;gt;")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; If [Sheet1$.Lead] &amp;gt;= 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='0' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;" &lt;BR /&gt; End If &lt;BR /&gt; If [Sheet1$.Lead] &amp;lt; 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If &lt;BR /&gt; If isNull([Sheet1$.Lead]) Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;NA&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The trouble is that some of the values contain ND. If I add an if statement for these, no label is generated for those particular points:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Function FindLabel ( [SoilBoring.ID] , [Sheet1$.Lead]) &lt;BR /&gt;FindLabel = ("&amp;lt;FNT size = '8'&amp;gt;&amp;lt;BOL&amp;gt;" + [SoilBoring.ID] + "&amp;lt;/BOL&amp;gt;&amp;lt;/FNT&amp;gt;")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; If inStr(1,[Sheet1$.Lead],"ND") = 1 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;ND&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;BR /&gt; If [Sheet1$.Lead] &amp;gt;= 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='0' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;" &lt;BR /&gt; End If &lt;BR /&gt; If [Sheet1$.Lead] &amp;lt; 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If &lt;BR /&gt; If isNull([Sheet1$.Lead]) Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;NA&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I use only that conditional statement, then the label is generated:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Function FindLabel ( [SoilBoring.ID] , [Sheet1$.Lead]) &lt;BR /&gt;FindLabel = ("&amp;lt;FNT size = '8'&amp;gt;&amp;lt;BOL&amp;gt;" + [SoilBoring.ID] + "&amp;lt;/BOL&amp;gt;&amp;lt;/FNT&amp;gt;")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; If inStr(1,[Sheet1$.Lead],"ND") = 1 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;ND&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Any ideas? Or maybe just a better way to do this? I really appreciate the help, I've been pulling out my hair all day. After I get this sorted out, I would like to add additional compounds to the label.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Oct 2019 21:50:45 GMT</pubDate>
    <dc:creator>JesseBorges1</dc:creator>
    <dc:date>2019-10-07T21:50:45Z</dc:date>
    <item>
      <title>Help with Conditional Labeling</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-conditional-labeling/m-p/329453#M14381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am having some trouble with conditional label formatting and am hoping someone can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like is for the labels to contain the point name along with lead concentrations that are highlighted when above 80. This VBScript seems to work fine:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Function FindLabel ( [SoilBoring.ID] , [Sheet1$.Lead]) &lt;BR /&gt;FindLabel = ("&amp;lt;FNT size = '8'&amp;gt;&amp;lt;BOL&amp;gt;" + [SoilBoring.ID] + "&amp;lt;/BOL&amp;gt;&amp;lt;/FNT&amp;gt;")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; If [Sheet1$.Lead] &amp;gt;= 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='0' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;" &lt;BR /&gt; End If &lt;BR /&gt; If [Sheet1$.Lead] &amp;lt; 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If &lt;BR /&gt; If isNull([Sheet1$.Lead]) Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;NA&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The trouble is that some of the values contain ND. If I add an if statement for these, no label is generated for those particular points:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Function FindLabel ( [SoilBoring.ID] , [Sheet1$.Lead]) &lt;BR /&gt;FindLabel = ("&amp;lt;FNT size = '8'&amp;gt;&amp;lt;BOL&amp;gt;" + [SoilBoring.ID] + "&amp;lt;/BOL&amp;gt;&amp;lt;/FNT&amp;gt;")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; If inStr(1,[Sheet1$.Lead],"ND") = 1 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;ND&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;BR /&gt; If [Sheet1$.Lead] &amp;gt;= 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='0' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;" &lt;BR /&gt; End If &lt;BR /&gt; If [Sheet1$.Lead] &amp;lt; 80 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;" + [Sheet1$.Lead] + "&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If &lt;BR /&gt; If isNull([Sheet1$.Lead]) Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;NA&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I use only that conditional statement, then the label is generated:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Function FindLabel ( [SoilBoring.ID] , [Sheet1$.Lead]) &lt;BR /&gt;FindLabel = ("&amp;lt;FNT size = '8'&amp;gt;&amp;lt;BOL&amp;gt;" + [SoilBoring.ID] + "&amp;lt;/BOL&amp;gt;&amp;lt;/FNT&amp;gt;")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; If inStr(1,[Sheet1$.Lead],"ND") = 1 Then &lt;BR /&gt; FindLabel = FindLabel &amp;amp; vbnewline &amp;amp; "&amp;lt;BGD red='255' green='255' blue='255' alpha='100' outline_red='0' outline_green='0' outline_blue='0' width='0.5'&amp;gt;&amp;lt;CLR blue = '255'&amp;gt;ND&amp;lt;/CLR&amp;gt;&amp;lt;/BGD&amp;gt;"&lt;BR /&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Any ideas? Or maybe just a better way to do this? I really appreciate the help, I've been pulling out my hair all day. After I get this sorted out, I would like to add additional compounds to the label.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2019 21:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-conditional-labeling/m-p/329453#M14381</guid>
      <dc:creator>JesseBorges1</dc:creator>
      <dc:date>2019-10-07T21:50:45Z</dc:date>
    </item>
  </channel>
</rss>

