Could someone help me determine the reason I cannot select "Aggregated Geometry" as a result type when I am doing a Utility Network Trace in ArcGIS Pro or in Python? In ArcGIS Pro (version 2.7), the option is there in the geoprocessing tool dialog box when I first open the tool, but as soon as I select my input Utility Network, it disappears. In my stand alone Python script, if I change the result_types parameter from SELECTION to AGGREGATED_GEOMETRY , I get the error ERROR 000622: Failed to execute (Trace). Parameters are not valid.
ERROR 000800: The value is not a member of Selection.
Failed to execute (Trace). This is a problem for me because my end goal is to publish this script as a geoprocessing tool and have it output geometry that I can put on a web map. If the Trace can only result in a selection set, is there a way to access those selected features in a standalone Python script?
... View more
Thanks for this solution, @jcarlson! I was able to work with @PrachiPatel to write a script using the template you provided. Instead of setting up a recurring task, I stored it as a Google Cloud Function and then added the URL of the function as a webhook that runs when the survey is submitted. There's a blog post that explains doing this here: Calling Python scripts with Survey123, Integromat,... - Esri Community. I used this code to get the object id of the submitted survey. def update_table(request):
request_json = request.get_json(silent=True)
object_id = request_json['feature']['result']['objectId'] Then, instead of truncating and recreating the entire chart_table, I filtered the survey_layer by the object id, did my reshaping on just the submitted row, and added the reshaped rows to the chart_table. survey_data = survey_layer.query(where='objectid = ' + str(object_id), as_df=True)
# In this section (omitted) the submitted row gets pivoted to 12 rows (one per month)
... View more