<?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 Simple Batch Editor ExB in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/simple-batch-editor-exb/m-p/1281782#M6754</link>
    <description>&lt;P&gt;Hello. I was tasked with developing a simpler "batch attribute editor" in Experience Builder, since it is not yet available publicly. Unlike the WAB batch editor, I do not need an editor as the project demands are to take the selected rows and run various CRUD queries.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So the best example I found, and modified it with other examples.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/" target="_self"&gt;https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I used esri-loader to dynamically load the JS API inside ExB and added most of the widget code from the example, but I need to select the feature table as the entire logic is based on the table selection event.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function selectFeatures(geometry) {
          if (csvLayerView) {
            // create a query and set its geometry parameter to the
            // rectangle that was drawn on the view
            const query = {
              geometry: geometry,
              outFields: ["*"]
            };

            // query graphics from the csv layer view. Geometry set for the query
            // can be polygon for point features and only intersecting geometries are returned
            csvLayer
              .queryFeatures(query)
              .then((results) =&amp;gt; {
                if (results.features.length === 0) {
                  clearSelection();
                } else {
                  // pass in the query results to the table by calling its selectRows method.
                  // This will trigger FeatureTable's selection-change event
                  // where we will be setting the feature effect on the csv layer view
                  featureTable.filterGeometry = geometry;
                  featureTable.selectRows(results.features);
                  // counter_atts.innerHTML = results.features.length;
                }
              })
              .catch(errorCallback);
          }
        }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Currently the script I'm using is still using Feature Table like in JS API, but I don't need to load the table dynamically, just use the one in the view.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        // create a new instance of a FeatureTable
        const featureTable = new this.FeatureTable({
          view: this.state.jimuMapView.view,
          layer: this.csvLayer,
          highlightOnRowSelectEnabled: true,
          container: document.getElementById("featureTable")
        });

 let features = [];

        // Listen for the table's selection-change event
        featureTable.on("selection-change", (changes) =&amp;gt; {
          // if the feature is unselected then remove the objectId
          // of the removed feature from the features array
          changes.removed.forEach((item) =&amp;gt; {
            const data = features.find((data) =&amp;gt; {
              return data === item.objectId;
            });
            if (data) {
              features.splice(features.indexOf(data), 1);
              // counter_atts.innerHTML = counter_atts_value-1;
            }
          });

          // If the selection is added, push all added selections to array
          changes.added.forEach((item) =&amp;gt; {
            features.push(item.objectId);
            // counter_atts.innerHTML = counter_atts_value+1;
          });

          // set excluded effect on the features that are not selected in the table
          csvLayerView.featureEffect = {
            filter: {
              objectIds: features
            },
            excludedEffect: "blur(5px) grayscale(90%) opacity(40%)"
          };
        });&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Just need to select the rows in the table when the sketchviewmodel draws the rectangle and gets the features. Afterwards I can run CRUD operations with the selected features.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Apr 2023 12:41:56 GMT</pubDate>
    <dc:creator>GDipublisher</dc:creator>
    <dc:date>2023-04-24T12:41:56Z</dc:date>
    <item>
      <title>Simple Batch Editor ExB</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/simple-batch-editor-exb/m-p/1281782#M6754</link>
      <description>&lt;P&gt;Hello. I was tasked with developing a simpler "batch attribute editor" in Experience Builder, since it is not yet available publicly. Unlike the WAB batch editor, I do not need an editor as the project demands are to take the selected rows and run various CRUD queries.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So the best example I found, and modified it with other examples.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/" target="_self"&gt;https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I used esri-loader to dynamically load the JS API inside ExB and added most of the widget code from the example, but I need to select the feature table as the entire logic is based on the table selection event.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function selectFeatures(geometry) {
          if (csvLayerView) {
            // create a query and set its geometry parameter to the
            // rectangle that was drawn on the view
            const query = {
              geometry: geometry,
              outFields: ["*"]
            };

            // query graphics from the csv layer view. Geometry set for the query
            // can be polygon for point features and only intersecting geometries are returned
            csvLayer
              .queryFeatures(query)
              .then((results) =&amp;gt; {
                if (results.features.length === 0) {
                  clearSelection();
                } else {
                  // pass in the query results to the table by calling its selectRows method.
                  // This will trigger FeatureTable's selection-change event
                  // where we will be setting the feature effect on the csv layer view
                  featureTable.filterGeometry = geometry;
                  featureTable.selectRows(results.features);
                  // counter_atts.innerHTML = results.features.length;
                }
              })
              .catch(errorCallback);
          }
        }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Currently the script I'm using is still using Feature Table like in JS API, but I don't need to load the table dynamically, just use the one in the view.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        // create a new instance of a FeatureTable
        const featureTable = new this.FeatureTable({
          view: this.state.jimuMapView.view,
          layer: this.csvLayer,
          highlightOnRowSelectEnabled: true,
          container: document.getElementById("featureTable")
        });

 let features = [];

        // Listen for the table's selection-change event
        featureTable.on("selection-change", (changes) =&amp;gt; {
          // if the feature is unselected then remove the objectId
          // of the removed feature from the features array
          changes.removed.forEach((item) =&amp;gt; {
            const data = features.find((data) =&amp;gt; {
              return data === item.objectId;
            });
            if (data) {
              features.splice(features.indexOf(data), 1);
              // counter_atts.innerHTML = counter_atts_value-1;
            }
          });

          // If the selection is added, push all added selections to array
          changes.added.forEach((item) =&amp;gt; {
            features.push(item.objectId);
            // counter_atts.innerHTML = counter_atts_value+1;
          });

          // set excluded effect on the features that are not selected in the table
          csvLayerView.featureEffect = {
            filter: {
              objectIds: features
            },
            excludedEffect: "blur(5px) grayscale(90%) opacity(40%)"
          };
        });&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Just need to select the rows in the table when the sketchviewmodel draws the rectangle and gets the features. Afterwards I can run CRUD operations with the selected features.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 12:41:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/simple-batch-editor-exb/m-p/1281782#M6754</guid>
      <dc:creator>GDipublisher</dc:creator>
      <dc:date>2023-04-24T12:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Batch Editor ExB</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/simple-batch-editor-exb/m-p/1628439#M19623</link>
      <description>&lt;P&gt;Batch editing is also now available in the Edit widget when using "Interact with a Map widget" mode, in Experience Builder in ArcGIS Online. Enable the option in the General settings.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlixVezina_0-1751302359631.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/135381i3F0308E6E141A67D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlixVezina_0-1751302359631.png" alt="AlixVezina_0-1751302359631.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 16:53:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/simple-batch-editor-exb/m-p/1628439#M19623</guid>
      <dc:creator>AlixVezina</dc:creator>
      <dc:date>2025-06-30T16:53:19Z</dc:date>
    </item>
  </channel>
</rss>

