<?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 Identify Text in one field to change another field in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1260804#M65849</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var description = $feature.PointDescription
var lz = Find('LOADING ZONE',description)

IIf(lz == -1, 'Y', 'N') // 'LOADING ZONE' not found -&amp;gt; 'Y'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also replace 'LOADING ZONE' and check if the description has changed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var description = $feature.PointDescription
var repl_description = Replace(description, 'LOADING ZONE', '')
IIf(repl_description == description, 'Y', 'N' )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2023 08:46:02 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-02-23T08:46:02Z</dc:date>
    <item>
      <title>Arcade Identify Text in one field to change another field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1260703#M65844</link>
      <description>&lt;P&gt;I have a bus stops point dataset. There is a field called "IsBusStop" and every single point is set to &lt;STRONG&gt;Y&lt;/STRONG&gt;. The problem is, some of the points are actually loading zones, not bus stops. There is a point description field which includes "LOADING ZONE" for those points. I need to find that text, and then change IsBusStop to &lt;STRONG&gt;N&lt;/STRONG&gt;. I'm trying to use the Find() function, but it's not working. I need something along the lines of "LIKE" in SQL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my expression so far:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var description = $feature.PointDescription
var busstop = $feature.IsBusStop
var lz = Find('LOADING ZONE',description)

When(lz == 1, Replace(busstop, 'Y', 'N'),busstop )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 23:03:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1260703#M65844</guid>
      <dc:creator>LeviCecil</dc:creator>
      <dc:date>2023-02-22T23:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Identify Text in one field to change another field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1260804#M65849</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var description = $feature.PointDescription
var lz = Find('LOADING ZONE',description)

IIf(lz == -1, 'Y', 'N') // 'LOADING ZONE' not found -&amp;gt; 'Y'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also replace 'LOADING ZONE' and check if the description has changed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var description = $feature.PointDescription
var repl_description = Replace(description, 'LOADING ZONE', '')
IIf(repl_description == description, 'Y', 'N' )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 08:46:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1260804#M65849</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-02-23T08:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Identify Text in one field to change another field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1261107#M65872</link>
      <description>&lt;P&gt;Thanks for this, but I need to change the IsBusStop field based on whether or not "LOADING ZONE" is found in the description field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just figured it out.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var description = $feature.PointDescription
var busstop = $feature.IsBusStop
var loadingzone = Find('LOADING ZONE',description)
var lz = Find('LZ',description)

When(loadingzone &amp;gt; 0 || lz &amp;gt; 0, Replace(busstop, 'Y', 'N'),busstop)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 23 Feb 2023 20:26:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1261107#M65872</guid>
      <dc:creator>LeviCecil</dc:creator>
      <dc:date>2023-02-23T20:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Identify Text in one field to change another field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1261326#M65886</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;but I need to change the IsBusStop field based on whether or not "LOADING ZONE" is found in the description field.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Yes, but if the IsBusStop field can only have the values "Y" and "N", then you don't actually need to replace that value, you can just set it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;but I need to change the IsBusStop field based on whether or not "LOADING ZONE" is found in the description field.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;That's because you use another expression. Try it with the expression that actually worked.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 08:12:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-identify-text-in-one-field-to-change/m-p/1261326#M65886</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-02-24T08:12:02Z</dc:date>
    </item>
  </channel>
</rss>

