<?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: Looking for a Parenthesis when there are ones there - help in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568455#M1648</link>
    <description>&lt;P&gt;I'll give this a try in the future, needed to get it working and in the hands of testers quickly.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2024 16:32:21 GMT</pubDate>
    <dc:creator>LorindaGilbert</dc:creator>
    <dc:date>2024-12-13T16:32:21Z</dc:date>
    <item>
      <title>Looking for a Parenthesis when there are ones there - help</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568234#M1643</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Working on a new AR and it keeps telling me that it needs a Close Parenthesis.&amp;nbsp; I've checked this thing over and over and don't see any missing.&amp;nbsp; It is based on another script that works - hence my confusion.&amp;nbsp; Says it is on the first 'else if' line.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;DIV&gt;var addrtype = $feature.AddrType&lt;/DIV&gt;&lt;DIV&gt;var addrsub = $feature.AddrSubCode&lt;/DIV&gt;&lt;DIV&gt;var addrstat = $feature.AddrStatus&lt;/DIV&gt;&lt;DIV&gt;var lsotype = $feature.LSOType&lt;/DIV&gt;&lt;DIV&gt;var unit = $feature.Unit&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;if (addrtype == 1) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;addrstat = 'A';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;else if ((addrtype = 3) &amp;amp;&amp;amp; (addrsub = 'PRESUB') &amp;amp;&amp;amp; (!IsEmpty(unit))) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;addrstat = 'R';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;else if ((addrtype = 3) &amp;amp;&amp;amp; (addrsub = 'MODEL')) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;addrstat = 'R';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;else if ((addrtype = 3) &amp;amp;&amp;amp; ((addrsub != 'MODEL') or (addrsub != 'PRESUB'))) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;addrstat = 'A';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;else if (addrtype = 2) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;addrstat = 'A';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;else {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;addrstat = addrstat;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;return addrstat;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Dec 2024 22:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568234#M1643</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2024-12-12T22:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Parenthesis when there are ones there - help</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568253#M1644</link>
      <description>&lt;P&gt;Line 16 uses "or" instead of "||", that might be leading to the error message.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 23:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568253#M1644</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2024-12-12T23:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Parenthesis when there are ones there - help</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568260#M1645</link>
      <description>&lt;P&gt;You're also using the assignment operator "=" when you should be using the equality operator "==" in a bunch of places, that'll usually lead to bugs if it also isn't causing a syntax error.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 23:55:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568260#M1645</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2024-12-12T23:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Parenthesis when there are ones there - help</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568282#M1646</link>
      <description>&lt;P&gt;In addition to &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/4413"&gt;@DavidSolari&lt;/a&gt; 's advice, you might also try using the function &lt;STRONG&gt;When&lt;/STRONG&gt;. It works the same as a big if/else block, but it's more concise.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return When(
  addrtype == 1, 'A',
  addrtype == 3 &amp;amp;&amp;amp; addrsub = 'PRESUB' &amp;amp;&amp;amp; !IsEmpty(unit), 'R',
  // and so on. the last line is the default "else" option
  addrstat
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 13 Dec 2024 03:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568282#M1646</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-12-13T03:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Parenthesis when there are ones there - help</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568452#M1647</link>
      <description>&lt;P&gt;I knew it was something silly that I was missing.&amp;nbsp; That one has tripped me up several times - you'd think that I would learn to look for that one&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 16:31:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568452#M1647</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2024-12-13T16:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for a Parenthesis when there are ones there - help</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568455#M1648</link>
      <description>&lt;P&gt;I'll give this a try in the future, needed to get it working and in the hands of testers quickly.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 16:32:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/looking-for-a-parenthesis-when-there-are-ones/m-p/1568455#M1648</guid>
      <dc:creator>LorindaGilbert</dc:creator>
      <dc:date>2024-12-13T16:32:21Z</dc:date>
    </item>
  </channel>
</rss>

