Show record id

This sample demonstrates how to provide data action in a widget.

How to use the sample

Clone the sample repo and copy this widget's folder (within widgets) to the client/your-extensions/widgets folder of your Experience Builder installation.

How it works

Define the data action in the folder of src/data-actions. Then extend the base class AbstractDataAction and implement its methods: isSupported and onExecute.

Register the data action in manifest.

  "dataActions": [
    {
      "name": "showId",
      "label": "show id",
      "uri": "data-actions/show-id"
    }
  ],

Add nls labels in src/runtime/translations/default.ts for the data action if necessary. The name of the nls property should follow the pattern _action_${dataActionName}_label. In this case, it is _action_showId_label.

export default {
  _widgetLabel: 'ShowId',
  _action_showId_label: 'Show id',
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close