field mapping issue in addlocations method

Discussion created by clemini on Nov 3, 2016
Latest reply on Nov 7, 2016 by clemini

Hello everyone,


Do you know how to map a field in the Arcpy's AddLocations method, from a GPFeatureRecordSetLayer dataset (FeatureSet from my JavaScript code) ?


I created an OD matrix that runs well and that's got for inputs destination GPFeatureRecordSetLayer. It seems to be a problem in the field mapping when I add a location to my destinations, since my location to add are GPFeatureRecordSetLayer and not a Table View. The field mapping goes well when I try it with a table but not with my FeatureSet. Therefore, in output, I don't have the names of my destinations as I wanted to have with the field mapping, but a default name (Location 1, or 2, or 3 ...). Difficult to retrieve the good destination then !


I wish I was enough clear. I can forward my piece of code if you need.


Thanks in advance !