<?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 How Can I Make My List Widget Automatically Update Directions on the Map? in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1634436#M20018</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m building an Experience Builder app (Developer Edition) and could use some advice. I have a List widget showing multiple store locations, and I’d like it so when a user clicks on a store, the map automatically updates with directions to that location—without the user needing to manually add stops in the Directions widget. Even better, if the user selects multiple stores, I’d love for the route to automatically optimize so it shows the shortest path. Is there a way to do this in the ArcGIS Online version without coding, or do I need to build something in Developer Edition? If Developer Edition is the way to go, what’s the best approach to pull the selected stores from the list, feed them into the Directions widget (or a Route Task), and display the optimized route on the map? Any tips, examples, or pointers would be awesome!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Jul 2025 18:43:14 GMT</pubDate>
    <dc:creator>GID</dc:creator>
    <dc:date>2025-07-20T18:43:14Z</dc:date>
    <item>
      <title>How Can I Make My List Widget Automatically Update Directions on the Map?</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1634436#M20018</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I’m building an Experience Builder app (Developer Edition) and could use some advice. I have a List widget showing multiple store locations, and I’d like it so when a user clicks on a store, the map automatically updates with directions to that location—without the user needing to manually add stops in the Directions widget. Even better, if the user selects multiple stores, I’d love for the route to automatically optimize so it shows the shortest path. Is there a way to do this in the ArcGIS Online version without coding, or do I need to build something in Developer Edition? If Developer Edition is the way to go, what’s the best approach to pull the selected stores from the list, feed them into the Directions widget (or a Route Task), and display the optimized route on the map? Any tips, examples, or pointers would be awesome!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jul 2025 18:43:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1634436#M20018</guid>
      <dc:creator>GID</dc:creator>
      <dc:date>2025-07-20T18:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Make My List Widget Automatically Update Directions on the Map?</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1634450#M20020</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've worked on a similar use case recently using &lt;STRONG&gt;ArcGIS Experience Builder Developer Edition&lt;/STRONG&gt;, and here’s what I’ve learned:&lt;/P&gt;&lt;P&gt;Unfortunately, the &lt;STRONG&gt;hosted ArcGIS Online version of Experience Builder&lt;/STRONG&gt; doesn’t currently support auto-populating the &lt;STRONG&gt;Directions widget&lt;/STRONG&gt; based on dynamic selections from a List widget. Users still have to manually add stops, and route optimization (e.g., shortest path across multiple locations) isn’t available out of the box.&lt;/P&gt;&lt;P&gt;To achieve what you're aiming for—&lt;STRONG&gt;automatically generating and optimizing a route when one or more stores are selected from the list&lt;/STRONG&gt;—you’ll need to use the &lt;STRONG&gt;Developer Edition&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Here’s a high-level approach:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Listen to the List widget's selection&lt;/STRONG&gt;: Capture the selected store locations.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Use the ArcGIS REST Routing Service&lt;/STRONG&gt; via the ArcGIS API for JavaScript or REST JS to compute the route.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Enable optimization&lt;/STRONG&gt; by setting:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;findBestSequence = true&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;preserveFirstStop = true&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Display the resulting route on the map&lt;/STRONG&gt; using a GraphicsLayer.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Example (Developer Edition):&lt;/P&gt;&lt;P&gt;Using RouteTask from the JS API, you can pass selected store geometries as stops and get an optimized route. Here's a simplified snippet:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const routeParams = new RouteParameters({
stops: new FeatureSet({ features: selectedStoreGraphics }),
findBestSequence: true,
preserveFirstStop: true,
returnRoutes: true
});
routeTask.solve(routeParams).then(result =&amp;gt; {
// Add result.routeResults[0].route to the map
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This lets you build a fully dynamic experience: when the user selects stores, the route automatically appears on the map—optimized and ready.&lt;/P&gt;&lt;P&gt;If you're new to the Developer Edition, I recommend starting with the &lt;A target="_new" rel="noopener"&gt;official SDK&lt;/A&gt; and exploring custom widgets. Feel free to DM me if you’d like a working widget template or more detailed examples!&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;BR /&gt;Venkat&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jul 2025 22:41:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1634450#M20020</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2025-07-20T22:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Make My List Widget Automatically Update Directions on the Map?</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1634457#M20021</link>
      <description>&lt;P&gt;Thanks for the detailed breakdown—this is exactly the kind of functionality I'm looking to implement.&lt;/P&gt;&lt;P&gt;You're right that the hosted version of Experience Builder doesn’t currently support dynamic routing tied to list selections, so I’ve been worstore feature layer and then uses the ArcGIS REST Routing Service to generate optimized routes.&lt;/P&gt;&lt;P&gt;I appreciate the code snippet and would definitely be interested in checking out a working widget template if you're open to sharing it. That would really help speed up development.&lt;/P&gt;&lt;P&gt;Let’s stay in touch as I build this out. I’ll share back what I come up with too!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 00:03:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1634457#M20021</guid>
      <dc:creator>GID</dc:creator>
      <dc:date>2025-07-21T00:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Make My List Widget Automatically Update Directions on the Map?</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1651840#M20884</link>
      <description>&lt;P&gt;Hi John,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks! I don’t have access to the original S&amp;amp;P environment or that widget anymore, but here are two supported ways to wire &lt;STRONG&gt;List → Directions&lt;/STRONG&gt; in &lt;STRONG&gt;Experience Builder&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A) No-code (built-in actions)&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Make sure the List and Directions use layers in the same map (or at least that the List items carry geometry).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;In &lt;STRONG&gt;Directions&lt;/STRONG&gt;, enable accepting features as stops (Data actions).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;In &lt;STRONG&gt;List → Action&lt;/STRONG&gt;: add a &lt;STRONG&gt;Message action&lt;/STRONG&gt; for &lt;STRONG&gt;Record selection changes&lt;/STRONG&gt; → target the &lt;STRONG&gt;Directions&lt;/STRONG&gt; widget → &lt;STRONG&gt;Add as stop&lt;/STRONG&gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Multi-select in the List lets users add multiple stops; in Directions, enable &lt;STRONG&gt;Optimize route&lt;/STRONG&gt; to reorder.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;B) Low-code (custom widget “bridge”)&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Create a tiny widget that listens to the List’s selection and pushes stops into Directions:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="javascript"&gt;// pseudo-code (TypeScript)
const ds = DataSourceManager.getInstance().getDataSource(listDsId);
ds.on('selectionChange', async () =&amp;gt; {
  const recs = await ds.getSelectedRecords();
  const stops = recs.map(r =&amp;gt; ({
    geometry: r.getGeometry(),
    attributes: { name: r.getData().Name }
  }));
  // publish a message or call your Directions VM to add stops
  MessageManager.getInstance().publishMessage(
    new DataRecordsSelectionChangeMessage(widgetId, recs)
  );
  // or, if you host your own route logic, call JS API Directions/RouteLayer here
});&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;This keeps your UI simple: select in List → stops appear in Directions → &lt;STRONG&gt;Optimize&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;When to choose which&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If your List items already have points and you just need “click to route,” &lt;STRONG&gt;A&lt;/STRONG&gt; is fastest.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If you need custom logic (e.g., dedupe, custom stop names/order, auto-route on select), use &lt;STRONG&gt;B&lt;/STRONG&gt;.&lt;BR /&gt;Regards,&lt;BR /&gt;Venkat&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 19 Sep 2025 17:40:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/how-can-i-make-my-list-widget-automatically-update/m-p/1651840#M20884</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2025-09-19T17:40:47Z</dc:date>
    </item>
  </channel>
</rss>

