Add/Append attribute to Feature Set?
Is there a way to add/append an attribute to a feature set? Goal is to build a buffer and query a layer. Inside a for each on the results set, calculate distance from point to feature. Once for each is complete, sort the results on the calculated distance and display to user.
Set Feature Attribute seems to replace a value of an existing attribute - unless I'm missing something.
Would help a ton rather than running 10-15 get Feature Attribute Value inside the for each to recreate the returned results with the added distance attribute.
0
-
To append attributes use an Evaluate Activity with something like this example we use for geocoding a spreadsheet. Then you can set your values.
=$fsGeocodes.featureSet.fields=$spreadsheetToFeatureSet.result[0].fields.concat([ { name: "X_COORD", alias: "X_COORD", type: "esriFieldTypeDouble" }, { name: "Y_COORD", alias: "Y_COORD", type: "esriFieldTypeDouble" }, { name: "CONFIDENCE", alias: "CONFIDENCE", type: "esriFieldTypeString", length: 255 }, { name: "BOTTLER_ID", alias: "BOTTLER_ID", type: "esriFieldTypeString", length: 255 }, { name: "BOTTLER", alias: "BOTTLER", type: "esriFieldTypeString", length: 255 }, { name: "TERRITORY_ID", alias: "TERRITORY_ID", type: "esriFieldTypeString", length: 255 }, { name: "TERRITORY", alias: "TERRITORY", type: "esriFieldTypeString", length: 255 } ])0
Please sign in to leave a comment.
Comments
1 comment