AnsweredAssumed Answered

Merge two data sets with conditions for field placement

Question asked by cgoessl on Apr 9, 2020
Latest reply on Apr 9, 2020 by jborgion

I am attempting to merge two different datasets and need some direction.

The feature (Incident) I have has the following fields:

Incident Number, date and call processing, unit1, raction1, travel1, unit2, reaction2, travel2, .......


I want to merge a table (Unit) with the following information:

Incident number, Unit, Reaction, Travel, and sequence.


I want to take the table and place the information that equals the incident number and place the information into the appropriate field for the units.


Tried using field calculation to come up with a python script, but for the life of me I can't think how to get this done. I tried the following but i keep getting errors.

#Field =
answer(!UnitData.Apparatus_Name!, !UnitData.Sequence!)

#Code Block
def answer(unit, seq):
if seq == 2:
return unit
return None


In the long run, I want to be able to create a script to run to merge the data automatically to populate the data into a single field.


Thanks for the thoughts...