<?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: Label expression If Else multiple fields in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-if-else-multiple-fields/m-p/1255620#M65181</link>
    <description>&lt;P&gt;Switch tha language to Arcade, use this expression:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var titles = ["ZEE", "OP", "Vast", "Lok"]
var values = [
    $feature.Km_paal_in_zee,
    $feature.Oriëntatiepaal,
    $feature.vaste_plaatsnaam,
    $feature.Lokale_benaming,
    ]

var lines = []
for(var i in titles) {
    if(!IsEmpty(values[i])) {
        var line = `${titles[i]}-&amp;lt;BOL&amp;gt;&amp;lt;CLR red="21" green="47" blue="255"&amp;gt;${values[i]}&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;`
        Push(lines, line)
    }
}
return Concatenate(lines, TextFormatting.NewLine)
&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 07 Feb 2023 09:11:22 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-02-07T09:11:22Z</dc:date>
    <item>
      <title>Label expression If Else multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-if-else-multiple-fields/m-p/1255616#M65179</link>
      <description>&lt;P&gt;I have 4 Attributes&amp;nbsp; in One label.&lt;/P&gt;&lt;P&gt;I have 4 attributes in 1 label.&lt;BR /&gt;Each attribute starts with a title and then the text.&lt;/P&gt;&lt;P&gt;If the text = null for an attribute I would not want to see a title for this attribute.&lt;/P&gt;&lt;P&gt;Do I have to write a completely new script for each attribute?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicolasSoenens_0-1675759310741.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62229i439BAE5A4822709B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicolasSoenens_0-1675759310741.png" alt="NicolasSoenens_0-1675759310741.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#FF0000"&gt;"ZEE-"&lt;/FONT&gt;&amp;amp;"&amp;lt;BOL&amp;gt;&amp;lt;CLR red='21' green='47' blue='255'&amp;gt;" &amp;amp; &lt;FONT color="#FF0000"&gt;[Km_paal_in_zee]&lt;/FONT&gt; &amp;amp;&amp;nbsp; "&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;"&amp;amp; vbNewLine &amp;amp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#FF0000"&gt;" OP-"&lt;/FONT&gt;&amp;amp;"&amp;lt;BOL&amp;gt;&amp;lt;CLR red='21' green='47' blue='255'&amp;gt;"&amp;amp;&lt;FONT color="#FF0000"&gt; [Oriëntatiepaal]&lt;/FONT&gt;&amp;amp;&amp;nbsp; "&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;"&amp;amp; vbNewLine &amp;amp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#FF0000"&gt;"Vast-"&lt;/FONT&gt;&amp;amp;"&amp;lt;BOL&amp;gt;&amp;lt;CLR red='21' green='47' blue='255'&amp;gt;" &amp;amp;&lt;FONT color="#FF0000"&gt;[vaste_plaatsnaam]&lt;/FONT&gt;&amp;amp;&amp;nbsp; "&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;"&amp;amp; vbNewLine &amp;amp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#FF0000"&gt;"Lok-"&lt;/FONT&gt;&amp;amp;"&amp;lt;BOL&amp;gt;&amp;lt;CLR red='21' green='47' blue='255'&amp;gt;" &lt;FONT color="#FF0000"&gt;&amp;amp;[Lokale_benaming]&lt;/FONT&gt;&amp;amp;&amp;nbsp; "&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;"&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 08:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-if-else-multiple-fields/m-p/1255616#M65179</guid>
      <dc:creator>NicolasSoenens</dc:creator>
      <dc:date>2023-02-07T08:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Label expression If Else multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-if-else-multiple-fields/m-p/1255620#M65181</link>
      <description>&lt;P&gt;Switch tha language to Arcade, use this expression:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var titles = ["ZEE", "OP", "Vast", "Lok"]
var values = [
    $feature.Km_paal_in_zee,
    $feature.Oriëntatiepaal,
    $feature.vaste_plaatsnaam,
    $feature.Lokale_benaming,
    ]

var lines = []
for(var i in titles) {
    if(!IsEmpty(values[i])) {
        var line = `${titles[i]}-&amp;lt;BOL&amp;gt;&amp;lt;CLR red="21" green="47" blue="255"&amp;gt;${values[i]}&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;`
        Push(lines, line)
    }
}
return Concatenate(lines, TextFormatting.NewLine)
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Feb 2023 09:11:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-if-else-multiple-fields/m-p/1255620#M65181</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-02-07T09:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Label expression If Else multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/label-expression-if-else-multiple-fields/m-p/1255624#M65183</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You made my day!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicolasSoenens_0-1675761755910.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62230i20048B6D14ABCC5A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicolasSoenens_0-1675761755910.png" alt="NicolasSoenens_0-1675761755910.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 09:23:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/label-expression-if-else-multiple-fields/m-p/1255624#M65183</guid>
      <dc:creator>NicolasSoenens</dc:creator>
      <dc:date>2023-02-07T09:23:32Z</dc:date>
    </item>
  </channel>
</rss>

