<?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: is there an expression to differentiate SELECT vs ADD in arcade expression? in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325509#M6941</link>
    <description>&lt;P&gt;Thanks Justin!!! let me try to update my codes&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2023 17:27:07 GMT</pubDate>
    <dc:creator>WilsonLee</dc:creator>
    <dc:date>2023-09-05T17:27:07Z</dc:date>
    <item>
      <title>is there an expression to differentiate SELECT vs ADD in arcade expression?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325490#M6939</link>
      <description>&lt;P&gt;&lt;SPAN&gt;in Field Maps Arcade Expression, how can I &lt;U&gt;&lt;STRONG&gt;differentiate between "selecting an existing point" and "adding a new poi&lt;/STRONG&gt;&lt;STRONG&gt;n&lt;/STRONG&gt;&lt;STRONG&gt;t"&lt;/STRONG&gt; &lt;/U&gt;within an Arcade expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm trying to apply a&amp;nbsp; different&amp;nbsp;code based on the action selected by a user (SELECT vs ADD) from a same layer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;currently, i have setup 2 layers in field maps for "Updating" and "adding a new point", but would like to combine them and make it more convenient&amp;nbsp;for user.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Wilson&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 17:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325490#M6939</guid>
      <dc:creator>WilsonLee</dc:creator>
      <dc:date>2023-09-05T17:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: is there an expression to differentiate SELECT vs ADD in arcade expression?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325506#M6940</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/74229"&gt;@WilsonLee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I believe what you are looking for is the edit context/edit type.&amp;nbsp; It is a profile variable found in the Form Calculation and Form Constraint Arcade Profiles&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/profiles/form-calculation/" target="_blank"&gt;https://developers.arcgis.com/arcade/profiles/form-calculation/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/profiles/form-constraint/" target="_blank"&gt;https://developers.arcgis.com/arcade/profiles/form-constraint/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JustinReynolds_0-1693933991054.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79859iFD05C26F2549EF8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinReynolds_0-1693933991054.png" alt="JustinReynolds_0-1693933991054.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Your Add is INSERT and your select is UPDATE.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Example usage of $editcontext.editType

if ($editcontext.editType == 'UPDATE') {        
    if (!IsEmpty($originalFeature)) {
        var oSelf = $originalFeature.rsrc_previous_feature_info;
        var oServiceNumber = $originalFeature.service_number;
        if (oServiceNumber == serviceNumber) {return oSelf};
    };
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 17:20:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325506#M6940</guid>
      <dc:creator>JustinReynolds</dc:creator>
      <dc:date>2023-09-05T17:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: is there an expression to differentiate SELECT vs ADD in arcade expression?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325509#M6941</link>
      <description>&lt;P&gt;Thanks Justin!!! let me try to update my codes&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 17:27:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325509#M6941</guid>
      <dc:creator>WilsonLee</dc:creator>
      <dc:date>2023-09-05T17:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: is there an expression to differentiate SELECT vs ADD in arcade expression?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325614#M6943</link>
      <description>&lt;P&gt;THANKS again! it works!!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 20:29:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-there-an-expression-to-differentiate-select-vs/m-p/1325614#M6943</guid>
      <dc:creator>WilsonLee</dc:creator>
      <dc:date>2023-09-05T20:29:19Z</dc:date>
    </item>
  </channel>
</rss>

