<?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: Creating a background color based on a field value using Arcade in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637970#M65807</link>
    <description>&lt;P&gt;Thank you! I was looking at pop-ups the essential guides and didn't come across this one.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jul 2025 13:17:23 GMT</pubDate>
    <dc:creator>NathanGabbard</dc:creator>
    <dc:date>2025-07-31T13:17:23Z</dc:date>
    <item>
      <title>Creating a background color based on a field value using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637839#M65801</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'll start off by saying that I'm not very good at coding. Trying to think outside the box when I don't even know what the box is, is making for some difficult times, but I'm trying!&lt;/P&gt;&lt;P&gt;I'm trying to create a background color based on a field value using arcade, this is going in the Title location under pop-ups. I was able to create a box color for the text using HTML however that wasn't based on any values. The picture below is what I'm basically trying to accomplish. Each color matches the icons on the map&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Warranty = Purple&lt;/P&gt;&lt;P&gt;In Development Review = Yellow&lt;/P&gt;&lt;P&gt;Approved = Green&lt;/P&gt;&lt;P&gt;Under Construction = Orange&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NathanGabbard_0-1753912208733.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137559i6D8E802E2968148F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NathanGabbard_0-1753912208733.png" alt="NathanGabbard_0-1753912208733.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated. I've looked at several guides and tried using the AI generator but didn't have much luck with either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 21:52:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637839#M65801</guid>
      <dc:creator>NathanGabbard</dc:creator>
      <dc:date>2025-07-30T21:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a background color based on a field value using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637856#M65802</link>
      <description>&lt;P&gt;There's an ESRI blog that will help you on your way.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/spruce-up-your-pop-ups-with-css" target="_blank" rel="noopener"&gt;Spruce up your pop-ups with CSS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As well as this map;&amp;nbsp;&lt;A href="https://jsapi.maps.arcgis.com/apps/mapviewer/index.html?webmap=b558bcb7197644e0b982b8cddcea7277" target="_blank" rel="noopener"&gt;Flexbox CSS examples&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I found them really useful I then created pop-ups that related directly to the symbology in a few maps I publish. For example, I publish an ownership map which contains 6 different status types, I can reflect the colour of the symbology within the pop-up. You will create a simple Arcade Expression for the symbology colours, then it's that reference that's added into your pop-up text box html.&lt;BR /&gt;&lt;BR /&gt;Don't worry, the two example links makes it all quite clear and you can copy out the scripts used too.&lt;/P&gt;&lt;P&gt;Below is an example of what I did from the two pages linked;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_0-1753923130349.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137564i804F41DA2464B552/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_0-1753923130349.png" alt="JonathanMcD_0-1753923130349.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Following is the code for the top text box;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_1-1753923371406.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137565i18F16EF9E9B50490/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_1-1753923371406.png" alt="JonathanMcD_1-1753923371406.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The popup for this dataset is just a series of text boxes with either the code to create layouts or &amp;lt;hr&amp;gt; to create the line.&lt;/P&gt;&lt;P&gt;This is just part of the code for the rest of the pop-up. You can see, once you get your head around how the columns work, it's a case of copy/paste for your own use.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_2-1753923961407.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137566i8B98E369E0311AC8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_2-1753923961407.png" alt="JonathanMcD_2-1753923961407.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and finally, this is an example of the expression to define the colours.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_3-1753924026449.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137567i651BF444798CC691/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_3-1753924026449.png" alt="JonathanMcD_3-1753924026449.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(PS - I'm not a coder or anything like that, I just had ideas on what I want to do with pop-ups, so for those that know way more than me, please don't pick holes in what I've done .... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 01:09:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637856#M65802</guid>
      <dc:creator>JonathanMcD</dc:creator>
      <dc:date>2025-07-31T01:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a background color based on a field value using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637970#M65807</link>
      <description>&lt;P&gt;Thank you! I was looking at pop-ups the essential guides and didn't come across this one.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 13:17:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637970#M65807</guid>
      <dc:creator>NathanGabbard</dc:creator>
      <dc:date>2025-07-31T13:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a background color based on a field value using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637997#M65808</link>
      <description>&lt;P&gt;So I gave it a shot, and I had tried something similar to this yesterday and got the same results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NathanGabbard_0-1753970030941.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137592i2335491084A153D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NathanGabbard_0-1753970030941.png" alt="NathanGabbard_0-1753970030941.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My titles look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NathanGabbard_1-1753970064351.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137593i9B3538646C693B5A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NathanGabbard_1-1753970064351.png" alt="NathanGabbard_1-1753970064351.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Clearly I'm doing something wrong but following all the examples, I don't know what.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 13:53:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1637997#M65808</guid>
      <dc:creator>NathanGabbard</dc:creator>
      <dc:date>2025-07-31T13:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a background color based on a field value using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1638206#M65822</link>
      <description>&lt;P&gt;So, whilst you can change the colours of Text Boxes in the pop-up, you can't change the pop-up Title background. As you can see, you can use that field for an expression return and you can see your expression working.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The colour management is in the Text Box HTML - as you can see by the full view of my pop-up.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_0-1753998567613.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137636i44904C5E20513303/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_0-1753998567613.png" alt="JonathanMcD_0-1753998567613.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_3-1753998820777.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137640i84259D8AE8D281D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_3-1753998820777.png" alt="JonathanMcD_3-1753998820777.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_1-1753998692722.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137638i799D99A0DFBF11A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_1-1753998692722.png" alt="JonathanMcD_1-1753998692722.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanMcD_2-1753998738205.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/137639i1A5F4047F1CC6DE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanMcD_2-1753998738205.png" alt="JonathanMcD_2-1753998738205.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>Thu, 31 Jul 2025 21:53:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1638206#M65822</guid>
      <dc:creator>JonathanMcD</dc:creator>
      <dc:date>2025-07-31T21:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a background color based on a field value using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1638842#M65843</link>
      <description>&lt;P&gt;Ah I see, okay that is good to know!&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2025 15:45:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/creating-a-background-color-based-on-a-field-value/m-p/1638842#M65843</guid>
      <dc:creator>NathanGabbard</dc:creator>
      <dc:date>2025-08-04T15:45:09Z</dc:date>
    </item>
  </channel>
</rss>

