<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Triggering data actions from a custom widget in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1344451#M9093</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/435059"&gt;@chapmunnhsc&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;This is a few months old but did you get this functionality working?&lt;/P&gt;&lt;P&gt;I managed to get the View in Table data action but I can't quite figure out how to pass in my feature layer.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2023 15:26:01 GMT</pubDate>
    <dc:creator>JillianStanford</dc:creator>
    <dc:date>2023-11-01T15:26:01Z</dc:date>
    <item>
      <title>Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1215506#M5361</link>
      <description>&lt;P&gt;I want to enable a custom widget to consume the "View in Table" data action provided by the Table widget, but I don't want to use the DataActionDropDown component. How do I trigger the action programmatically? I don't see any methods to do so in the DataActionManager class.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 14:15:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1215506#M5361</guid>
      <dc:creator>MaxDiebold</dc:creator>
      <dc:date>2022-09-23T14:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1215652#M5365</link>
      <description>&lt;P&gt;Never mind, figured it out. Once an action object is obtained from&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DataActionManager.getInstance().getActions();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and the specific action is found, its `onExecute()` function can be called directly.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 18:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1215652#M5365</guid>
      <dc:creator>MaxDiebold</dc:creator>
      <dc:date>2022-09-23T18:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1269982#M6511</link>
      <description>&lt;P&gt;Max -&lt;/P&gt;&lt;P&gt;How did you import the DataActionManager? Where does it come from? There is like zero documentation on it. Also, did you figure out how to pass a Feature Layer to the Table action?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 18:05:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1269982#M6511</guid>
      <dc:creator>chapmunnhsc</dc:creator>
      <dc:date>2023-03-21T18:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1269983#M6512</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;AppDataActionManager&lt;/SPAN&gt; &lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;'./lib/app-data-action-manager'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Might answer my own Q.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Mar 2023 18:08:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1269983#M6512</guid>
      <dc:creator>chapmunnhsc</dc:creator>
      <dc:date>2023-03-21T18:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1344451#M9093</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/435059"&gt;@chapmunnhsc&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;This is a few months old but did you get this functionality working?&lt;/P&gt;&lt;P&gt;I managed to get the View in Table data action but I can't quite figure out how to pass in my feature layer.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 15:26:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1344451#M9093</guid>
      <dc:creator>JillianStanford</dc:creator>
      <dc:date>2023-11-01T15:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1352574#M9505</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86115"&gt;@JillianStanford&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;I didn't figure it out! I think I duct taped together a solution. However, I'm not at the point where I want to add a client side feature layer to the out of the box Table widget.&lt;/P&gt;&lt;P&gt;Any chance you know how to do that?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 15:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1352574#M9505</guid>
      <dc:creator>chapmunnhsc</dc:creator>
      <dc:date>2023-11-22T15:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1353564#M9556</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/435059"&gt;@chapmunnhsc&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I'm in the same boat and cannot figure it out! I'm finding developing for this platform incredibly frustrating. If I could start over, I would not use it.&lt;/P&gt;&lt;P&gt;I think I need to create an output data source that can be consumed by other widgets but can't figure out how to get it wired up.&lt;/P&gt;&lt;P&gt;If I figure it out, I will post it here.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 16:25:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1353564#M9556</guid>
      <dc:creator>JillianStanford</dc:creator>
      <dc:date>2023-11-27T16:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1392730#M11457</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86115"&gt;@JillianStanford&lt;/a&gt;&amp;nbsp;did you ever figure this out?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 18:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1392730#M11457</guid>
      <dc:creator>chapmunnhsc</dc:creator>
      <dc:date>2024-03-07T18:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1392750#M11460</link>
      <description>&lt;P&gt;Hi there &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/435059"&gt;@chapmunnhsc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I cobbled something together and posted it here - &lt;A href="https://community.esri.com/t5/arcgis-experience-builder-questions/custom-widget-output-datasource/m-p/1381931#M10865" target="_blank" rel="noopener"&gt;Custom Widget Output Datasource&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if it's the most elegant solution but I'm relieved to have something working after months of frustration!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 19:25:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1392750#M11460</guid>
      <dc:creator>JillianStanford</dc:creator>
      <dc:date>2024-03-07T19:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1392753#M11461</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86115"&gt;@JillianStanford&lt;/a&gt;&amp;nbsp;way to keep at it and figure it out! I'm about to ping you with another question...&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 19:39:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1392753#M11461</guid>
      <dc:creator>chapmunnhsc</dc:creator>
      <dc:date>2024-03-07T19:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1395264#M11560</link>
      <description>&lt;P&gt;Good morning dear,&lt;BR /&gt;How do I create a Data RecordSet (&lt;A href="https://developers.arcgis.com/experience-builder/api-reference/jimu-core/DataRecordSet/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developers.arcgis.com/experience-builder/api-reference/jimu-core/DataRecordSet/&lt;/A&gt;) from a record that contains feature and dataSource&amp;nbsp;to pass as a parameter to onExecute() ??&lt;/P&gt;&lt;P&gt;Can anybody help me? any example?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 14:44:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1395264#M11560</guid>
      <dc:creator>LucasAmarante</dc:creator>
      <dc:date>2024-03-13T14:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1533299#M14643</link>
      <description>&lt;P&gt;I recently went through a similar issue, and realized that state and props, aren't always the same when the widgets load, this lead to me looking into the Redux part of the React implementation in Experience builder.&amp;nbsp; Did you find you had to use a similar solution?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:30:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1533299#M14643</guid>
      <dc:creator>TimWestern</dc:creator>
      <dc:date>2024-08-30T13:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1533333#M14644</link>
      <description>&lt;P&gt;I know you were asking about this in march, but here's how I approached it:&lt;BR /&gt;&lt;BR /&gt;In the action.ts file for the action (note whatever I named the action I'd name it like name-for-action.ts&lt;BR /&gt;(where named-for is a kebab case version of the action name.)&lt;BR /&gt;&lt;BR /&gt;Here is a genericized version of an example of onExecute in&amp;nbsp; that class:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;onExecute (message: Message, actionConfig?: any): boolean | Promise&amp;lt;boolean&amp;gt; {
    if (message.type === MessageType.DataRecordsSelectionChange) {
      const dataRecordSetChangeMessage = message as DataRecordSetChangeMessage
      const widgetId = dataRecordSetChangeMessage.widgetId

      console.log('Received data recordSetChangeMessage:', dataRecordSetChangeMessage)

      // &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69004"&gt;@ts&lt;/a&gt;-expect-error
      const records = dataRecordSetChangeMessage.records || []
      if (records.length &amp;gt; 0) {
        const selectedRecord = records[0]
        const selectedFeature = selectedRecord?.feature

        if (selectedFeature) {
          const selectedAttributes = {
            attributes: selectedFeature.attributes,
			// (Note attribute_value_of_note in the system I was using could be lowercase or all upper case depending on whether it is a hosted layer or not)  It is a generic name and could be replaced with any field you'd find in the feature.attriubtes that are returned.
            attribute_value_of_note: selectedFeature.attributes.ATTRIBUTE_VALUE_OF_NOTE || selectedFeature.attributes.attribute_value_of_note,
            feature: selectedFeature,
            geometry: selectedFeature.geometry
          }
          console.log('Dispatching selected attribute_value_of_note attributes:', selectedAttributes)

          // Dispatch actions to the new Redux store extension
          getAppStore().dispatch(setSelectedAttributeOfValue(selectedAttributes.attribute_value_of_note))
          getAppStore().dispatch(setSelectedAttributes(selectedAttributes.attributes))

          // Convert geometry to JSON before dispatching
          getAppStore().dispatch(setSelectedGeometry(selectedFeature.geometry))
          getAppStore().dispatch(setSelectedFeature(selectedFeature))

          // If needed, you can still poll for state updates in the new store
          this.pollForSelectedAttributeOfValue(widgetId)
            .then(() =&amp;gt; {
              console.log('selectedAttributeOfValue successfully stored in the Redux store.')
            })
            .catch((error) =&amp;gt; {
              console.error(error.message)
            })
        } else {
          console.error('No feature found in the selected record.')
          return false
        }
      } else {
        console.error('No records found in the message.')
        return false
      }
    } else {
      console.error('Message type does not match.')
      return false
    }
    return true
  }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;action-types.ts&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// action-types.ts
export enum YourActionKeys {
  SetSelectedAttributeOfNote = 'SET_SELECTED_ATTRIBUTE_OF_NOTE',
  SetSelectedAttributes = 'SET_SELECTED_ATTRIBUTES',
  SetSelectedGeometry = 'SET_SELECTED_GEOMETRY',
  SetSelectedFeature = 'SET_SELECTED_FEATURE'
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;actions.ts&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// actions.ts
import { YourActionKeys } from './action-types'

export const setSelectedAttributeOfNote = (attributeOfNote: string) =&amp;gt; ({
  type: YourActionKeys.SetSelectedAttributeOfNote,
  attributeOfNote
})

export const setSelectedAttributes = (attributes: any) =&amp;gt; ({
  type: YourActionKeys.SetSelectedAttributes,
  attributes
})

export const setSelectedGeometry = (geometry: __esri.Geometry) =&amp;gt; {
  const geometryJSON = geometry.toJSON() // Convert to plain JSON object
  return {
    type: YourActionKeys.SetSelectedGeometry,
    geometry: geometryJSON
  }
}
export const setSelectedFeature = (feature: __esri.Geometry) =&amp;gt; {
  return {
	  // Note instead of setting up an Enum you could actually just have the string like this)
    type: 'SET_SELECTED_FEATURE',
    payload: feature
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;then in the store file for your widget. you need a getReducer method (but some of the interface and setup for the store can be defined here too:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// my-store.ts
import { type extensionSpec, type ImmutableObject, type IMState } from 'jimu-core'
import { YourActionKeys } from './action-types'

// interface MyState {
//   selectedAttributeOfNote: string | null
//   selectedAttributes: any
// }
// Note I used any because its often quicker than trying to speck out the deeply nested structures that might be returned.  If you want more type checking, definitely choose something other than any.
export interface YourWidgetStoreState {
  selectedAttributeOfNote: string | null
  selectedAttributes: any
  selectedGeometry: __esri.Geometry | null
  selectedFeature: any
}

export interface StateForYourWidgetStore extends IMState {
  YourWidgetStoreState: ImmutableObject&amp;lt;YourWidgetStoreState&amp;gt;
}

type IMYourWidgetStoreState = ImmutableObject&amp;lt;YourWidgetStoreState&amp;gt;

export default class YouWidgetStoreExtension implements extensionSpec.ReduxStoreExtension {
  id = 'your-results-store-extension'

  getActions () {
    return Object.keys(YourActionKeys).map(k =&amp;gt; YourActionKeys[k])
  }

  getInitLocalState () {
    return {
      selectedAttributeOfNote: null,
      selectedAttributes: null,
      selectedFeature: null,
      selectedGeometry: null
    }
  }

  getReducer () {
    return (localState: IMYourWidgetStoreState, action: any, appState: IMState): IMYourWidgetStoreState =&amp;gt; {
      switch (action.type) {
        case YourActionKeys.SetSelectedAttributeOfNote:
          return localState.set('selectedAttributeOfNote', action.attribute_of_note)
        case YourActionKeys.SetSelectedAttributes:
          return localState.set('selectedAttributes', action.attributes)
        case YourActionKeys.SetSelectedGeometry:
          return localState.set('selectedGeometry', action.geometry)
        case YourActionKeys.SetSelectedFeature:
          return localState.set('selectedFeature', action.feature)
        default:
          return localState
      }
    }
  }

  getStoreKey () {
    return 'YourWidgetStoreState'
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In theory you can generically then get access to what you stored when the action is triggered by just doing this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    const store = getAppStore()
    const storeState = store.getState() as StateForYourWidgetStore

    // Access yourWidgetStoreState directly from the store
    const yourWidgetStoreState = storeState.yourWidgetStoreState
    console.log('storeState.yourWidgetStoreState: ', yourWidgetStoreState)

    if (yourWidgetStoreState &amp;amp;&amp;amp; yourWidgetStoreState.selectedAttributeOfNote) {
      console.log(`Detected existing yourWidgetStoreState with attribute of note: ${yourWidgetStoreState.selectedAttributeOfNote}`)
    } else {
      console.log('No existing yourWidgetStoreState or attribute of note found.')
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example I was able to check this when the widget opened at construction, but in theory you could do it in whatever function in your widget would receive that message call.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:49:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1533333#M14644</guid>
      <dc:creator>TimWestern</dc:creator>
      <dc:date>2024-08-30T13:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1554353#M15745</link>
      <description>&lt;P&gt;Trying to wrap my head around Redux. In your scenario, what is the mechanism for calling onExecute? I would think there is some listener waiting to intercept a Message from the framework or another widget which then triggers the onExecute to handle it.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 16:16:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1554353#M15745</guid>
      <dc:creator>JarrettGreen</dc:creator>
      <dc:date>2024-10-31T16:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering data actions from a custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1554430#M15750</link>
      <description>&lt;P&gt;That's the genius part about actions, once you have it published, when you go to the actions tab in the dashboard to configure the experience you can select the widget, and the action, and do additional configuration (if there are custom settings desired)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To preempt what might be your next question (how to register your action with the experience) here's one possibly way it could be done.&amp;nbsp; Put this somewhere in componentDidMount and it will make sure the acftion is registered for the widget&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const registerWithTimeout = new Promise((resolve, reject) =&amp;gt; {
      const timeout = setTimeout(() =&amp;gt; {
        reject(new Error('registerAction timed out'))
      }, 5000) // Adjust time as needed

      MessageManager.getInstance().registerAction(selectParcelAction)
        .then((actionResult) =&amp;gt; {
          clearTimeout(timeout)
          resolve(actionResult)
        })
        .catch((error) =&amp;gt; {
          clearTimeout(timeout)
          reject(error)
        })
    })

    try {
      await registerWithTimeout
      console.log('componentDidMount: SelectParcelAction registered successfully.')
    } catch (error) {
      console.error('componentDidMount: Error or timeout during action registration:', error)
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Now I'll admit this is a bit more complex then what every action may need, I currently have my action wrapped in a timeout so that it doesn't keep registering while state updates are occurring.&amp;nbsp; In theory you shouldn't need anything more than&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;MessageManager.getInstance().registerAction(selectParcelAction)&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;This enables you to configure in the experience with messages get notified when certain actions happen in another widget (and in my example I used the default search widget to use it to not only query and store some info in appStore, but to launch / open the widget too.)&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 17:47:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/triggering-data-actions-from-a-custom-widget/m-p/1554430#M15750</guid>
      <dc:creator>TimWestern</dc:creator>
      <dc:date>2024-10-31T17:47:56Z</dc:date>
    </item>
  </channel>
</rss>

