<?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 Format multiple attributes in popup text based on same color bins in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/format-multiple-attributes-in-popup-text-based-on/m-p/1665853#M67092</link>
    <description>&lt;P&gt;I'd like to build a table in a popup that shows a matrix of different attribute values while formatting the cell background colors using the same range, e.g.&lt;/P&gt;&lt;P&gt;≤70% = red&lt;BR /&gt;70% to ≤80% = orange&lt;BR /&gt;80% to ≤90% = yellow&lt;BR /&gt;90% to ≤95% = green&lt;BR /&gt;&amp;gt;95% = blue&lt;/P&gt;&lt;P&gt;I have 30 different attribute values in the matrix table and I have to believe there's a better way to do this in arcade than writing an if else statement for each?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Nov 2025 15:24:41 GMT</pubDate>
    <dc:creator>GregMayes</dc:creator>
    <dc:date>2025-11-14T15:24:41Z</dc:date>
    <item>
      <title>Format multiple attributes in popup text based on same color bins</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/format-multiple-attributes-in-popup-text-based-on/m-p/1665853#M67092</link>
      <description>&lt;P&gt;I'd like to build a table in a popup that shows a matrix of different attribute values while formatting the cell background colors using the same range, e.g.&lt;/P&gt;&lt;P&gt;≤70% = red&lt;BR /&gt;70% to ≤80% = orange&lt;BR /&gt;80% to ≤90% = yellow&lt;BR /&gt;90% to ≤95% = green&lt;BR /&gt;&amp;gt;95% = blue&lt;/P&gt;&lt;P&gt;I have 30 different attribute values in the matrix table and I have to believe there's a better way to do this in arcade than writing an if else statement for each?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 15:24:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/format-multiple-attributes-in-popup-text-based-on/m-p/1665853#M67092</guid>
      <dc:creator>GregMayes</dc:creator>
      <dc:date>2025-11-14T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Format multiple attributes in popup text based on same color bins</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/format-multiple-attributes-in-popup-text-based-on/m-p/1665881#M67093</link>
      <description>&lt;P&gt;You can write a &lt;A href="https://developers.arcgis.com/arcade/guide/functions/#user-defined-functions" target="_self"&gt;function&lt;/A&gt; that returns the color for the attribute passed in as a parameter.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function bgColor(attribute) {
  when (attribute &amp;lt;= 70, "red",
        attribute &amp;lt;= 80, "orange",
        attribute &amp;lt;= 90, "yellow",
        attribute &amp;lt;= 95, "green",
        "blue")
}

//in use
var theColor = bgColor($feature.attribute)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 15:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/format-multiple-attributes-in-popup-text-based-on/m-p/1665881#M67093</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-11-14T15:57:56Z</dc:date>
    </item>
  </channel>
</rss>

