You are using a browser that is no longer supported. Please use the latest version of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. For more information please see the System Requirements.

Unsupported browser

You are using a browser that is not supported. JavaScript API works on the latest versions of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. Use one of these browsers and provide your feedback through GeoNet, the Esri Community.

  • {i18n.unsupportedBrowser.chrome}
  • Firefox
  • Safari
  • undefined
Loading...

Note: Support for 3D on mobile devices may vary, view the system requirements for more information.

This sample demonstrates how to add a FeatureTable widget to your application. The FeatureTable widget allows users to view and sort data and attributes from a FeatureLayer. In this specific example, the table is displayed as a standalone table without any associated map. It is possible to also add the table with an associated map, please refer to the FeatureTable widget using a map sample.

const table = new FeatureTable({
  layer: featureLayer,
  visibleElements: {selectionColumn: false}, // hide the selection column since we are not working with a corresponding map
  // autocastable to FieldColumnConfig
  // The fieldColumnConfigs are used to determine which attributes are shown in the table
  // If the fieldColumnConfigs are not set, all attributes will be shown
  fieldConfigs: [
    {
      name: "FID",
      label: "ID",
      // This field will not be shown in the table initially
      visible: false
    },
    {
      name: "NAME",
      label: "School Name",
      // The table will be sorted by this column
      // in ascending order
      direction: "asc"
    },
    {
      name: "TOT_ENROLL",
      label: "Enrollment"
    },
    ...
  ],
  container: "tableDiv"
});

Known Limitations

The FeatureTable is still in Beta and new capabilities will be added in upcoming releases. For a more comprehensive list of limitations, please refer to the widget's API Reference documentation.

Sample search results

TitleSample
Loading...