<?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: arcade expression notworkig in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-expression-notworkig/m-p/1584882#M86516</link>
    <description>&lt;P&gt;Use the When function instead of the ternary operator&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var borough = $feature['BoroughCode'];
When(borough == "M", 'Manhattan',
     borough == "X", 'Bronx',
     borough == "B", 'Brooklyn',
     borough == "Q", 'Queens',
     borough == "S", 'Staten Island',
     'n/a')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2025 13:50:19 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2025-02-13T13:50:19Z</dc:date>
    <item>
      <title>arcade expression notworkig</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-expression-notworkig/m-p/1584657#M86514</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have this code for a popup, and part of it includes an arcade expression to change the value, but my code is not working. I’m just starting to learn JavaScript right now, so I’m not very advanced in it. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//popup for Intersection
  const IntersectionPopupTemplate = {
    // You can dynamically set the title, e.g., the block's name
    title: "Holiday Embargo (Intersection)", 
    content: [
      {
        type: "fields",
        fieldInfos: [
          {
            fieldName: "OnStreetName", 
            label: "Cross Street 1"
          },
          {
            fieldName: "FromStreetName", 
            label: "Cross Street 2"
          },
          {
            fieldName: "BoroughCode", 
            label: "Borough",
            format: {
              expression: `
                var borough = $feature['BoroughCode'];
                return (borough == "M") ? 'Manhattan' :
                       (borough == "X") ? 'Bronx' :
                       (borough == "B") ? 'Brooklyn' :
                       (borough == "Q") ? 'Queens' :
                       (borough == "S") ? 'Staten Island' : 'n/a';
              `
            }
          }
        ]
      }
    ]
  };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 21:33:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-expression-notworkig/m-p/1584657#M86514</guid>
      <dc:creator>anonymous55</dc:creator>
      <dc:date>2025-02-12T21:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: arcade expression notworkig</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-expression-notworkig/m-p/1584882#M86516</link>
      <description>&lt;P&gt;Use the When function instead of the ternary operator&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var borough = $feature['BoroughCode'];
When(borough == "M", 'Manhattan',
     borough == "X", 'Bronx',
     borough == "B", 'Brooklyn',
     borough == "Q", 'Queens',
     borough == "S", 'Staten Island',
     'n/a')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 13:50:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-expression-notworkig/m-p/1584882#M86516</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-02-13T13:50:19Z</dc:date>
    </item>
  </channel>
</rss>

