<?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: Changing the color for a feature using Arcade in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581383#M63466</link>
    <description>&lt;P&gt;Ok, I guess that was not my understanding of how this worked. I was under the impression that if set the logic using Arcade the color of the feature would change in the map based on the way the logic was evaluated. I guess you're saying that is not the case, correct?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2025 17:05:15 GMT</pubDate>
    <dc:creator>MPach</dc:creator>
    <dc:date>2025-02-03T17:05:15Z</dc:date>
    <item>
      <title>Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581370#M63464</link>
      <description>&lt;P&gt;I'm trying to change the color of a feature using some Arcade logic. I'm not sure what property to set the value against though. Here's the Arcade Code:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var color = When( $feature.duedate &amp;gt; Now(), "#1550f5",
      $feature.duedate &amp;lt; Now() &amp;amp;&amp;amp; $feature["device_las"]=="Failed","#f7332a", 
      $feature.duedate &amp;lt; Now(), "#020202",
      $feature.Device_Status == "Inactive", "#fcf132", "#bdbabf" )
     &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I know I can set the color of text and selections using the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;return {
textColor: color,
backgroundColor: '',
separatorColor: '',
selectionColor: '',
selectionTextColor: '',

}&lt;/LI-CODE&gt;&lt;P&gt;but I can't figure out what property to use to change the color of feature itself. I wouldn't be surprised if this is a very easy answer.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 16:46:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581370#M63464</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2025-02-03T16:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581378#M63465</link>
      <description>&lt;P&gt;You use Arcade to set the outputs ("Active", "Inactive", "Failed", etc), but then you have to set the colors in the Styles dialog.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 16:54:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581378#M63465</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-02-03T16:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581383#M63466</link>
      <description>&lt;P&gt;Ok, I guess that was not my understanding of how this worked. I was under the impression that if set the logic using Arcade the color of the feature would change in the map based on the way the logic was evaluated. I guess you're saying that is not the case, correct?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 17:05:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581383#M63466</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2025-02-03T17:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581409#M63471</link>
      <description>&lt;P&gt;Unlike the Dashboard example you have in your initial question, the map doesn't get the color information from the Arcade expression for the symbology. It just gets the unique categories. For example, I have a map where I use an expression to classify the points based on the type of survey it is and whether it's been completed.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if ($feature.TYPE == "PRIMARY") {
  if ($feature.SURVEY == "FISH &amp;amp; BENTHIC") {
    if ($feature.BenthicStatus == 0 &amp;amp;&amp;amp; $feature.FishStatus == 0) {
      return "Fish and Benthics";
    }
  } else if ($feature.SURVEY == "FISH ONLY") {
    if ($feature.FishStatus == 0) {
      return "Fish Only";
    }
  }
} else if ($feature.TYPE == "SECONDARY") {
  return "Secondary Site";
}&lt;/LI-CODE&gt;&lt;P&gt;Then I go into the "Pick a style" section of the Styles dialog to select the symbol shape, color, outline, etc for each category.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_ef986d.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/124533iE613F4D796DF4547/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_ef986d.png" alt="Snag_ef986d.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note that if the attributes of the feature change, its symbololgy will be automatically updated according to your expression. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 17:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581409#M63471</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-02-03T17:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581425#M63472</link>
      <description>&lt;P&gt;Ok, that all makes sense. I feel like there is something else that I am missing then. Here's what I'm trying to do. I have a feature class with a bunch of fields describing backflow preventers for our Cross Connections Dept. The fields that are used in my Arcade logic are the Due Date, Last Test Status (Pass, Failed), and Device Status (Active, Inactive). I guess what I need to try to do then is get my Arcade or Python logic somehow to autopopulate a new field that holds the values being described, which in this case are 1) In Compliance 2) Failing and Past Due 3) Past Due 4) Inactive. From there I can use the Arcade expression I currently have to color code those values in the map. From the sounds of it I feel like I might need to publish a feature class and assign attribute rules for this. Any other help or way that you can think of to do something like this?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 18:39:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581425#M63472</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2025-02-03T18:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581511#M63477</link>
      <description>&lt;P&gt;If you have access to Pro you can try attribute driven symbology, I detail the basics in &lt;A href="https://community.esri.com/t5/arcgis-online-questions/dynamic-styling-based-on-user-selected-attributes/m-p/1578237/highlight/true#M63269" target="_self"&gt;this thread&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 20:46:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581511#M63477</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2025-02-03T20:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581515#M63478</link>
      <description>&lt;P&gt;Thank you. This looks promising. I'm hoping to have time to play with it tomorrow.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 21:10:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581515#M63478</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2025-02-03T21:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581852#M63493</link>
      <description>&lt;P&gt;I think this is going to work. You said it translates over to ArcGIS Online too, correct? Are there any changes that I have to make to have it work in an ArcGIS Online Map? One last question, I plan to use this map in a Field Maps application where new points will be placed on the map daily. Based on my testing it appears the symbology works dynamically based on the field values being used by the Arcade logic. Is there anything that I would need to know for Field Maps using these?&lt;/P&gt;&lt;P&gt;Thank you very much for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 17:11:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581852#M63493</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2025-02-04T17:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581858#M63495</link>
      <description>&lt;P&gt;I'll admit I didn't test this thoroughly but everything seemed to work in the ArcGIS Online map viewer. Field Maps has its own rendering engine so you'll have to do your own testing in there. Unless I've missed something, there's no way to configure this without Pro so you'll have to avoid symbology edits outside of there, so make sure everyone's happy with the rest of the symbols before you hit production. Good luck!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 17:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581858#M63495</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2025-02-04T17:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the color for a feature using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581859#M63496</link>
      <description>&lt;P&gt;Much appreciated! This saved me some hassle getting my TS department to set up an attribute rule for me since they won't given me access to the server directly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 17:23:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/changing-the-color-for-a-feature-using-arcade/m-p/1581859#M63496</guid>
      <dc:creator>MPach</dc:creator>
      <dc:date>2025-02-04T17:23:09Z</dc:date>
    </item>
  </channel>
</rss>

