<?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: Labeling by arcade||Etiquetar mediante arcade in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/labeling-by-arcade-etiquetar-mediante-arcade/m-p/1180700#M437</link>
    <description>&lt;P&gt;Hi Javier,&lt;/P&gt;&lt;P&gt;I'm not sure that DefaultValue is the function that you want. It evaluates the first parameter and if it finds null or an empty string it returns the second parameter.&lt;/P&gt;&lt;P&gt;Are you wanting to return "Pkinicial" if the value of the cngmetros field is 0 and "Pk5metros" if the value of cngmetros is a multiple of 5?&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2022 16:57:58 GMT</pubDate>
    <dc:creator>JillianStanford</dc:creator>
    <dc:date>2022-06-07T16:57:58Z</dc:date>
    <item>
      <title>Labeling by arcade||Etiquetar mediante arcade</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/labeling-by-arcade-etiquetar-mediante-arcade/m-p/1180623#M436</link>
      <description>&lt;P&gt;good afternoon, everyone,&lt;BR /&gt;I have a webmap where I represent kilometer points every meter, I would like to be able to label those P.K every 5 meters and for that I need to use an expression in arcade, but I can't find the solution.&lt;BR /&gt;I am currently trying a conditional with the expression equal or default but I don't get what I am looking for.&lt;BR /&gt;Does anyone know what would be the expression to label those P.K every 5 meters?&lt;/P&gt;&lt;P&gt;Thanks to all of you who participate.&lt;/P&gt;&lt;P&gt;example code:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (DefaultValue($feature.cngmetros, 0))&lt;BR /&gt;return Pkinicial&lt;BR /&gt;else (DefaultValue($feature.cngmetros, 5))&lt;BR /&gt;return PK5metros&lt;BR /&gt;else (DefaultValue($feature.cngmetros, ','))&lt;BR /&gt;return Pk5metros&lt;BR /&gt;else (DefaultValue($feature.cngmetros, '.'))&lt;BR /&gt;return Pk5metros&lt;/P&gt;&lt;P&gt;Greetings Javier&lt;/P&gt;&lt;P&gt;#############################ESPAÑOL##########################################&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;buenas tardes a todos ,&lt;BR /&gt;tengo un webmap donde represento puntos kilométricos cada metro, me gustaría poder etiquetar esos P.K cada 5 metros y para ello necesito utilizar un expresión en arcade, pero no encuentro la solución.&lt;BR /&gt;actualmente estoy intentando un condicional con la expresion equal o default pero no consigo lo que busco.&lt;BR /&gt;¿alguien sabe cual seria la expresion para etiquetar esos P.K cada 5 metros?&lt;/P&gt;&lt;P&gt;Gracias a todos lo que participeis.&lt;/P&gt;&lt;P&gt;ejemplo de codigo:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (DefaultValue($feature.cngmetros, 0))&lt;BR /&gt;return Pkinicial&lt;BR /&gt;else (DefaultValue($feature.cngmetros, 5))&lt;BR /&gt;return PK5metros&lt;BR /&gt;else (DefaultValue($feature.cngmetros, ','))&lt;BR /&gt;return Pk5metros&lt;BR /&gt;else (DefaultValue($feature.cngmetros, '.'))&lt;BR /&gt;return Pk5metros&lt;/P&gt;&lt;P&gt;Saludos Javier&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 14:52:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/labeling-by-arcade-etiquetar-mediante-arcade/m-p/1180623#M436</guid>
      <dc:creator>JavierCMartínezPrieto</dc:creator>
      <dc:date>2022-06-07T14:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling by arcade||Etiquetar mediante arcade</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/labeling-by-arcade-etiquetar-mediante-arcade/m-p/1180700#M437</link>
      <description>&lt;P&gt;Hi Javier,&lt;/P&gt;&lt;P&gt;I'm not sure that DefaultValue is the function that you want. It evaluates the first parameter and if it finds null or an empty string it returns the second parameter.&lt;/P&gt;&lt;P&gt;Are you wanting to return "Pkinicial" if the value of the cngmetros field is 0 and "Pk5metros" if the value of cngmetros is a multiple of 5?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 16:57:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/labeling-by-arcade-etiquetar-mediante-arcade/m-p/1180700#M437</guid>
      <dc:creator>JillianStanford</dc:creator>
      <dc:date>2022-06-07T16:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Labeling by arcade||Etiquetar mediante arcade</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/labeling-by-arcade-etiquetar-mediante-arcade/m-p/1180914#M438</link>
      <description>&lt;P&gt;To find multiples of a number, you can use the modulo operator. &lt;STRONG&gt;X&amp;nbsp;modulo Y&lt;/STRONG&gt;&amp;nbsp;means "&lt;STRONG&gt;divide X by Y and return the rest&lt;/STRONG&gt;". If the modulo is zero, X is divisible by Y, so it's a multiple.&lt;/P&gt;&lt;P&gt;So you could do something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var cngmetros = $feature.cngmetros
// if value is zero or divisible by 5
// % is the modulo operator in many languages
if(cngmetros == 0 || cngmetros % 5 == 0) {
    return cngmetros
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Jun 2022 05:52:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/labeling-by-arcade-etiquetar-mediante-arcade/m-p/1180914#M438</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-06-08T05:52:54Z</dc:date>
    </item>
  </channel>
</rss>

