laptop and a wrench

Erro

The Field Map parameter in the Append tool does not recognize the matching fields of a layer with editor tracking enabled in ArcGIS Pro.

ArcGIS Pro
Número de ID do Erro BUG-000157802
EnviadoApril 25, 2023
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS Pro
Versão encontrada3.1.1
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
Versão Fixa3.2, 3.1.3
StatusFixed

Informações Adicionais

This issue is addressed in ArcGIS Pro 3.2 and ArcGIS Pro 3.1.3.

Solução Provisória

The following Python script works to enable the editor tracking fields to be append and match the source dataset:

######################################

import arcpy

source = <link to source data>

target = <link to target data>

arcpy.env.preserveGlobalIds = True # can comment out this line if data does not have GlobalIds or if do not wish to preserve GlobalIds

arcpy.TruncateTable_management(target)

myFieldMappings = arcpy.FieldMappings()

myFieldMappings.addTable(target)

for fmi in range(myFieldMappings.fieldCount):

fm = myFieldMappings.getFieldMap(fmi)

 for targetfield_index in range(fm.inputFieldCount):

  intable = fm.getInputTableName(targetfield_index)

  if intable == arcpy.Describe(target).catalogPath:

fm.removeInputField(targetfield_index)

   myFieldMappings.replaceFieldMap(fmi, fm)

   break

    

for fmi in range(myFieldMappings.fieldCount):

fm = myFieldMappings.getFieldMap(fmi)

 targetFieldName = fm.outputField.name

 sourceFieldList = arcpy.ListFields(source,targetFieldName)

 for f in sourceFieldList:

 if (len(sourceFieldList)) > 0:

  sourceField = sourceFieldList[0]

  newFMap = arcpy.FieldMap()

 newFMap.addInputField(source,sourceField.name)

  myFieldMappings.replaceFieldMap(fmi, newFMap)

arcpy.Append_management(source, target, "NO_TEST", myFieldMappings)

Etapas para Reproduzir

ID do Erro: BUG-000157802

Software:

  • ArcGIS Pro

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download