<?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: Attribute Assistant IIF() in State &amp; Local Government Questions</title>
    <link>https://community.esri.com/t5/state-local-government-questions/attribute-assistant-iif/m-p/310559#M1878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael-&amp;nbsp; forgot this is vbscript not vba, which according to my searches does.&amp;nbsp; When I get back to work I'll give&amp;nbsp; instr() a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Oct 2017 13:54:04 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2017-10-07T13:54:04Z</dc:date>
    <item>
      <title>Attribute Assistant IIF()</title>
      <link>https://community.esri.com/t5/state-local-government-questions/attribute-assistant-iif/m-p/310557#M1876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of my expressions is an IIF() statement, and I keep getting errors in the log file.&amp;nbsp; For the life of me, I can't see what the problem is.&amp;nbsp; I've gone so far to simplify the expression but it still does not update the field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update field [STR2_NAME] if another field (&amp;nbsp; [STR2_NAME_W_SPACES]&amp;nbsp; ) has letters in it.&amp;nbsp; If it does, populate field&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;[STR2_NAME]&amp;nbsp; with&amp;nbsp; the letter A otherwise, populate field&amp;nbsp;[STR2_NAME] with the letter B.&amp;nbsp; As mentioned this is a very simplified version of my original IIF() which had a replace() function in it.&amp;nbsp; I tested the syntax of my replace() function in the original in a field calculator, so it was correct.&amp;nbsp; For the test, [STR2_NAME_W_SPACES] has a value of&amp;nbsp;WHAT THE HECK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the log file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Row Info&lt;BR /&gt; Row Number 5&lt;BR /&gt; TableName: MasterStreetNameFC&lt;BR /&gt; FieldName: STR2_NAME&lt;BR /&gt; ValueInfo: IIF([STR2_NAME_W_SPACES] like '[A-Z]*', "A", "B")&lt;/P&gt;&lt;P&gt;IIF([STR2_NAME_W_SPACES]&amp;lt;'A',"A","B")&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;#### interesting that it's not &amp;lt;=&amp;nbsp; &amp;nbsp;A LT sign should result in a number...&lt;/STRONG&gt;&lt;/EM&gt;..&lt;BR /&gt; ValueMethod: EXPRESSION&lt;BR /&gt; On Create: 1&lt;BR /&gt; On Change: 1&lt;/P&gt;&lt;P&gt;Checking for Subtype Restriction&lt;BR /&gt; Field Name: STR2_NAME was found at index: 4&lt;BR /&gt; Trying: EXPRESSION&lt;BR /&gt; replace field: STR2_NAME_W_SPACES with a value&lt;BR /&gt; Checking to verify there is a field to store the expression&lt;BR /&gt;Expression to be eval: IIF("WHAT THE HECK" like '[A-Z]*', "A", "B")&lt;BR /&gt; ERROR: evaluating the expression for feature in MasterStreetNameFC with OID of 20335&lt;BR /&gt; System.Runtime.InteropServices.COMException (0x800A03EA): Syntax error&lt;BR /&gt; at MSScriptControl.ScriptControlClass.Eval(String Expression)&lt;BR /&gt; at ArcGIS4LocalGovernment.AttributeAssistantEditorExtension.SetDynamicValues(IObject inObject, String mode, List`1&amp;amp; ChangeFeatureList, List`1&amp;amp; NewFeatureList, List`1&amp;amp; ChangeFeatureGeoList) in C:\Projects\GitHub\local-government-desktop-addins\Attribute Assistant Add In\AttributeAssistantAddIn\AttributeAssistantEditorExtension.cs:line 12266&lt;BR /&gt; Finished: EXPRESSION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 22:04:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/attribute-assistant-iif/m-p/310557#M1876</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2017-10-04T22:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Assistant IIF()</title>
      <link>https://community.esri.com/t5/state-local-government-questions/attribute-assistant-iif/m-p/310558#M1877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pretty sure vbscript does not support Like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try instr.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.experts-exchange.com/questions/11460378/vbscript-like-operator.html" title="https://www.experts-exchange.com/questions/11460378/vbscript-like-operator.html"&gt;https://www.experts-exchange.com/questions/11460378/vbscript-like-operator.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2017 22:24:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/attribute-assistant-iif/m-p/310558#M1877</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2017-10-06T22:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Assistant IIF()</title>
      <link>https://community.esri.com/t5/state-local-government-questions/attribute-assistant-iif/m-p/310559#M1878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael-&amp;nbsp; forgot this is vbscript not vba, which according to my searches does.&amp;nbsp; When I get back to work I'll give&amp;nbsp; instr() a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Oct 2017 13:54:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/attribute-assistant-iif/m-p/310559#M1878</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2017-10-07T13:54:04Z</dc:date>
    </item>
  </channel>
</rss>

