<?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: Sharing some functions that could be added for further arcade enhancements in ArcGIS Arcade Questions</title>
    <link>https://community.esri.com/t5/arcgis-arcade-questions/sharing-some-functions-that-could-be-added-for/m-p/1585474#M8</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/22623"&gt;@RPGIS&lt;/a&gt;&amp;nbsp;- I'm assuming these work with the datastore profile, but otherwise where are you using this?&amp;nbsp; As an attribute rule? Does this set up a field map for an append or data load op?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2025 14:20:53 GMT</pubDate>
    <dc:creator>DavidColey</dc:creator>
    <dc:date>2025-02-14T14:20:53Z</dc:date>
    <item>
      <title>Sharing some functions that could be added for further arcade enhancements</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/sharing-some-functions-that-could-be-added-for/m-p/1575494#M2</link>
      <description>&lt;P&gt;The functions below work for ArcGIS Enterprise 10.8 and later. I have used these two functions quite often since these automatically account for matching field names but don't account for field types.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get matching field names found in both lists
function GetMatchingFields( FieldListA, FieldListB ){
var MatchingFields = Null
var separator = ','
// Loop through the list of field names in list A
for ( var a in FieldListA ){
for ( var b in FieldListB ){
if ( FieldListA[ a ] == FieldListB[ b ] ){ MatchingFields += FieldListA[ a ] + separator }
}
}
if ( IsEmpty( MatchingFields ) == False ){ MatchingFields = split( MatchingFields , separator ) }
return MatchingFields
}

// Get field names from input features
function GetFieldNames( InputDictionary , OmitFields ){
var FieldNames = Null
var separator = ','
for ( var field in InputDictionary ){
// Populate the specified list with the field name
var keep = True
for ( var i in OmitFields ){
if ( field == OmitFields[ i ] ){ keep = False ; Break }
}
if ( keep == True ){ FieldNames += field + ',' }
}
if ( IsEmpty( FieldNames ) == False ){ FieldNames = split( FieldNames , separator ) }
return FieldNames
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The functions below were updated to use on Enterprise 10.9 and later.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get matching field names found in both lists
function GetMatchingFields( FieldListA, FieldListB ){
    var MatchingFields = []
    // Loop through the list of field names in list A
    for ( var a in FieldListA ){
        if ( Includes( FieldListB , a ) ){ Push( MatchingFields , a ) }
        }
    if ( Count( MatchingFields ) == 0 ){ MatchingFields = Null }
    return MatchingFields
    }

// Get field names from input features
function GetFieldNames( InputFeature , OmitFields ){
    if( TypeOf( InputFeature ) == 'Feature' ){ InputFeature = First( InputFeature ) }
    var FieldNames = []
    for ( var field in InputFeature ){
        // Populate the specified list with the field name
        if ( !Includes( OmitFields , field ) ){ Push( FieldNames , field ) }
        }
    if ( Count( FieldNames ) == 0 ){ FieldNames = Null }
    return FieldNames
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice if functions like these were added to the library of functions in arcade since it is fairly standard and would be easier to use.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 17:59:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/sharing-some-functions-that-could-be-added-for/m-p/1575494#M2</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2025-01-14T17:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing some functions that could be added for further arcade enhancements</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/sharing-some-functions-that-could-be-added-for/m-p/1585474#M8</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/22623"&gt;@RPGIS&lt;/a&gt;&amp;nbsp;- I'm assuming these work with the datastore profile, but otherwise where are you using this?&amp;nbsp; As an attribute rule? Does this set up a field map for an append or data load op?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 14:20:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/sharing-some-functions-that-could-be-added-for/m-p/1585474#M8</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2025-02-14T14:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing some functions that could be added for further arcade enhancements</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/sharing-some-functions-that-could-be-added-for/m-p/1585732#M9</link>
      <description>&lt;P&gt;I use this as part of an attribute rule for the most part but it I have yet to test&lt;EM&gt; it in other places such as dashboards. It's mostly a data load operation, similar to using append with field map.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 21:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/sharing-some-functions-that-could-be-added-for/m-p/1585732#M9</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2025-02-14T21:56:01Z</dc:date>
    </item>
  </channel>
</rss>

