Skip To Content
ArcGIS Developer
Dashboard

Geoprocessing widget

(Added at v1.0)

The Geoprocessing widget provides a dynamic user interface to execute a geoprocessing task. It provides the ability to configure symbology for input and output layers, as well as overriding default values for parameters.

Configure the Geoprocessing widget

This widget can be set to open automatically when an app starts. Hover over the widget and click the Do not open this widget when the app starts button Do not open this widget when the app starts to change the setting to Open this widget automatically when the app starts. (For widgets that you need to add to the app first, you can turn on this option after configuring the widget.)

  1. Hover over the widget and click the Configure this widget button Configure this widget to open the configuration window.
    Note:

    If you need to add the widget to the app first, click a widget placeholder on the Widget tab. In the Choose Widget window that opens, select the widget and click OK.

  2. Click the Set button and add the geoprocessing service from ArcGIS Enterprise or ArcGIS Server.
    Caution:
    ArcGIS Web AppBuilder integrated in ArcGIS Online can access public and secured services from ArcGIS Server. However, secured services do not support ArcGIS Server with web-tier authentication, such as IWA, PKI, or LDAP authentication. Refer to ArcGIS Online ArcGIS Server web services for more information.
    Note:
    The Geoprocessing widget does not support ArcGIS Online Spatial Analysis services.

    Note:
    The Geoprocessing widget does not support OGC Web Processing Services (WPS).

    The list of Input and Output parameters for the task populates, along with the Layer order and Options sections.

    Geoprocessing sections

  3. To configure each Input parameter, click to make it active. The default values, defined by the published geoprocessing service, populate in the Label, Tooltip, and default value areas, such as Input Feature by and Symbol in this case. You can input features with one of the following options:
    • Interactively drawing on the map
    • Use shapefile in local file system
    • Selecting a layer from the map
    • URL

    You may have the Use current map extent option to use the current map extent as the input feature for the polygon.

  4. Check Visible to display the parameter on the widget interface.

    The content of the default value area varies based on the parameter type. For details, see Geoprocessing parameter types.

  5. Click each Output parameter to make it active and configure it. Set the label and ToolTip for the output, and check the boxes below to control how the output displays:
    • Ignore this output
    • Turn off this layer by default
    • Output may have different schema, use dynamic schema instead of predefined
  6. Click the Renderer tab, which is GPFeatureRecordSetLayer in this case.
    1. In the Use section, choose Unique Symbols from the drop-down list.
    2. In the To Show section, choose ToBreak from the drop-down list.
    3. Choose a color pattern.
    4. Click the Add button (+) to add different values that you want to show in the Add Value box.
    5. To display symbology for unmatched values, check the Others item in the list and choose a symbol. If you don't want to display this symbology, you can uncheck this option.
      Geoprocessing output parameter renderer configuration
  7. Select the fields to display in the Popup window for output features. Check the Enable popup check box to enable the pop-up. Click the Add drop-down arrow to select fields for the pop-up title. Check the check boxes in the Visible column to display the field in the pop-up when a feature is clicked. Reorder fields by clicking the up and down arrows next to the field.
    Geoprocessing output parameter pop-up configuration
  8. If the output parameter is GPRecordSet, you can configure the fields to display in the output table.
  9. Control the order of the layers (input, output) by clicking the up and down arrows in the Layer order section.

    Note:
    Output feature layers are always displayed on top of heat maps and tileset layers (map, imagery, and tiles).

  10. In the Options section, check Add result as operational layer to add the output layer to the map's operational layers. Check Allow to export results to export the result locally to a CSV file, feature collection, or GeoJSON file as well as to save the result as a feature collection item on the My Content tab in the Contents pane in ArcGIS Online or ArcGIS Enterprise. Additionally, if your geoprocessing service is published with the View result with a map service parameter, the Use the drawing options of result map service option is enabled. You can choose to draw the result with the map service. If you do, the Renderer capability of Output in step 5 is disabled.
    Options
    If the Output may have different schema, use dynamic schema instead of predefined option is checked, the schema of the output feature set can't be predicted, including the field definition and geometry type. As a result, the renderer is ignored, and the feature set is added as a graphics layer using the default symbol.
  11. Click OK to close the dialog box.

Use the Geoprocessing widget

  1. Click the widget icon to open the Geoprocessing widget.
  2. Enter a value for each of the input parameters. In this example, the drive time analysis geoprocessing task from ArcGIS Online is consumed. The task requires one or more starting locations and a set of space-delimited drive times to be used to calculate possible distances over time.
  3. Once all required input parameters (annotated by an asterisk next to the name) have values, click Execute to submit the task.

    The Output tab is selected and displays a progress indicator until execution completes.

  4. Upon completion, the geoprocessing results display on the map. Click Output to view their attributes.
    Geoprocessing output with attributes visible
  5. Click the ellipsis () to export the results to one of the following formats when the Allow to export results box is checked:
    • Export to CSV file
    • Export to Feature Collection
    • Export to GeoJSON
    • Save to My Content

    The Save to My Content option saves the result as a feature collection item on the My Content tab of the Contents pane in ArcGIS Online or ArcGIS Enterprise.

  6. Click Clear on the Input tab to clear the location, or click the x on the Output tab to clear the geoprocessing results from the map.