<?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 Costum Arcade symbology expression in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/costum-arcade-symbology-expression/m-p/1384862#M79099</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a Arcade expression that reads the value in the attribute table and converts the value to a name and a rgb-color code. The problem that occurs is that the symbology doesn't get changed, but within the value tab of the symbology it just produces the string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g instead of displaying the color that the rgb-code represents, it has the value:&lt;/P&gt;&lt;P&gt;{"color":"rgb(0, 0, 0)","colorName": "Error")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working with the following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Define attribute column&lt;BR /&gt;var ValueColor = $feature.Color&lt;/P&gt;&lt;P&gt;// Error/default color&lt;BR /&gt;var DefaultColor = "rgb(0, 0, 0)";&lt;BR /&gt;var DefaultName = "Error";&lt;/P&gt;&lt;P&gt;// Define color and name&lt;BR /&gt;var Color;&lt;BR /&gt;var ColorName;&lt;/P&gt;&lt;P&gt;// CAD_Color_serie_10&lt;/P&gt;&lt;P&gt;if (ValueColor == 10) {&lt;BR /&gt;Color = "rgb(255, 0, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 20) {&lt;BR /&gt;Color = "rgb(255, 63, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 30) {&lt;BR /&gt;Color = "rgb(rgb(255, 127, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;BR /&gt;else if (ValueColor == 40) {&lt;BR /&gt;Color = "rgb(255, 191, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 50) {&lt;BR /&gt;Color = "rgb(255, 255, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 60) {&lt;BR /&gt;Color = "rgb(191, 255, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 90) {&lt;BR /&gt;Color = "rgb(0, 255, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 130) {&lt;BR /&gt;Color = "rgb(0, 255, 255)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 150) {&lt;BR /&gt;Color = "rgb(255, 63 , 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 170) {&lt;BR /&gt;Color = "rgb(255, 63 , 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 210) {&lt;BR /&gt;Color = "rgb(255, 63 , 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;// return Error/Default color&lt;BR /&gt;else {&lt;BR /&gt;Color = DefaultColor;&lt;BR /&gt;ColorName = DefaultName; }&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt;"color": Color,&lt;BR /&gt;"colorName": ColorName&lt;BR /&gt;};&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2024 13:42:50 GMT</pubDate>
    <dc:creator>PjotrC</dc:creator>
    <dc:date>2024-02-21T13:42:50Z</dc:date>
    <item>
      <title>Costum Arcade symbology expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/costum-arcade-symbology-expression/m-p/1384862#M79099</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a Arcade expression that reads the value in the attribute table and converts the value to a name and a rgb-color code. The problem that occurs is that the symbology doesn't get changed, but within the value tab of the symbology it just produces the string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g instead of displaying the color that the rgb-code represents, it has the value:&lt;/P&gt;&lt;P&gt;{"color":"rgb(0, 0, 0)","colorName": "Error")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working with the following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Define attribute column&lt;BR /&gt;var ValueColor = $feature.Color&lt;/P&gt;&lt;P&gt;// Error/default color&lt;BR /&gt;var DefaultColor = "rgb(0, 0, 0)";&lt;BR /&gt;var DefaultName = "Error";&lt;/P&gt;&lt;P&gt;// Define color and name&lt;BR /&gt;var Color;&lt;BR /&gt;var ColorName;&lt;/P&gt;&lt;P&gt;// CAD_Color_serie_10&lt;/P&gt;&lt;P&gt;if (ValueColor == 10) {&lt;BR /&gt;Color = "rgb(255, 0, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 20) {&lt;BR /&gt;Color = "rgb(255, 63, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 30) {&lt;BR /&gt;Color = "rgb(rgb(255, 127, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;BR /&gt;else if (ValueColor == 40) {&lt;BR /&gt;Color = "rgb(255, 191, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 50) {&lt;BR /&gt;Color = "rgb(255, 255, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 60) {&lt;BR /&gt;Color = "rgb(191, 255, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 90) {&lt;BR /&gt;Color = "rgb(0, 255, 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 130) {&lt;BR /&gt;Color = "rgb(0, 255, 255)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 150) {&lt;BR /&gt;Color = "rgb(255, 63 , 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 170) {&lt;BR /&gt;Color = "rgb(255, 63 , 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;else if (ValueColor == 210) {&lt;BR /&gt;Color = "rgb(255, 63 , 0)";&lt;BR /&gt;ColorName = $feature.Layer; }&lt;/P&gt;&lt;P&gt;// return Error/Default color&lt;BR /&gt;else {&lt;BR /&gt;Color = DefaultColor;&lt;BR /&gt;ColorName = DefaultName; }&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt;"color": Color,&lt;BR /&gt;"colorName": ColorName&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 13:42:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/costum-arcade-symbology-expression/m-p/1384862#M79099</guid>
      <dc:creator>PjotrC</dc:creator>
      <dc:date>2024-02-21T13:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Costum Arcade symbology expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/costum-arcade-symbology-expression/m-p/1386252#M79230</link>
      <description>&lt;P&gt;Unfortunately, you can't set the symbology directly through Arcade. You have to go into the Styles editor and change the colors for each of the returned values. You can simplify the code this way.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var values = [10, 20, 30, 40, 50, 60, 90, 130, 150, 170, 210]
IIf(IndexOf(values, $feature.Color) &amp;gt; -1, $feature.Layer, 'Error')&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Feb 2024 20:04:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/costum-arcade-symbology-expression/m-p/1386252#M79230</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-02-23T20:04:58Z</dc:date>
    </item>
  </channel>
</rss>

