Select to view content in your preferred language

Select multiple features when using Survey widget to copy features - Experience Builder

479
13
09-23-2025 01:44 PM
Labels (2)
JasonFitzsimmons
Frequent Contributor

I need to create an app where clients can copy a selection of multiple features and copy those features into another layer. . This collection of features should be added to the target layer as a single feature. 

I have seen a way this might work with Web Editor, but we need additional features available in Experience Builder. 

I am trying this workflow as described here, using the Survey widget:

https://www.esri.com/arcgis-blog/products/experience-builder/real-time/using-experience-builder-and-...

This works when selecting a single feature, but I can't find a way to use this to select multiple features and add them to my target layer

Also, when adding a single feature, I can navigate to the source web map and see it there, but it will not appear in the Experience Builder session, unless I refresh the page. Is there a setting in Survey123 I am missing to refresh the data after saving an entry? This would be a dealbreaker if I can't fix it.

EDIT: I edited this post to clarify that the copied features should be added into the target layers as a single feature.  I have tried this in Web Editor, but there too I can only select a single feature at a time. 

13 Replies
VenkataKondepati
Regular Contributor

A few notes:

1) Multi-select → copy into another layer (OOTB)

  • Experience Builder + Survey widget supports one feature per submit. There’s no out-of-the-box bulk “copy selected features to target layer.”

  • Workarounds:

    • Append/Copy Features (GP/Analysis) with a WHERE/selection → run from a button; or

    • Custom ExB widget: read current map selection and call targetLayer.applyEdits({ adds: features }) (strip OBJECTID/GlobalID, handle subtypes/domains, project geometry).

2) Map not updating after Survey submit

  • In ExB, turn on Data → [your layer] → Auto refresh (set 5–10s while testing).

  • Or wire a Survey “Record created” → Map/List “Refresh data” action.

  • Also set the layer’s Refresh interval in the web map before adding to ExB.

Practical path

  • If you must stay OOTB: use Map Viewer (Editor / Copy to) or an Append task for batches.

  • If you need ExB UX + batch copy: a small custom widget using applyEdits is the cleanest.

If you want, I can sketch the applyEdits snippet and the message/action wiring so it refreshes instantly after the copy.

JasonFitzsimmons
Frequent Contributor

hi @VenkataKondepati , thanks for the detailed reply.

I don't think using MapViewer will work for our clients, who are not GIS users and want a more web app style user interface. 

I have never created a custom widget. If you can provide a sketch of that, I would appreciate it. 

0 Kudos
VenkataKondepati
Regular Contributor

Here’s a minimal “bridge” custom widget for Experience Builder that listens to a List’s selection and adds the selected feature as a stop to a Directions widget (or your own routing service). It’s a sketch you can drop into the ExB developer template and extend.

1) What it does

Subscribes to record selection from a target List.

Reads the selected feature’s geometry + a label.

Pushes it as a stop to your routing logic:

Option A: send a message to an existing Directions widget.

Option B: call your REST route (ArcGIS NA service or your API) and render results.

2) Files (core snippets)
manifest.json

{
  "name": "list-to-directions-bridge",
  "label": "List → Directions Bridge",
  "type": "widget",
  "version": "1.0.0",
  "exbVersion": "1.14.0",
  "author": "You",
  "dep": ["jimu-core","jimu-ui","jimu-arcgis"]
}

config.ts

import { ImmutableObject } from 'seamless-immutable';

export interface Config {
  listDataSourceId?: string;
  directionsWidgetId?: string; // optional: if you want to message an existing Directions widget
  autoRoute?: boolean;         // call your route API automatically on selection
}

export type IMConfig = ImmutableObject<Config>;

 

setting.tsx (simple settings panel)

import { React, AllDataSourceTypes, DataSourceSelector } from 'jimu-core';
import { SettingSection, SettingRow } from 'jimu-ui/advanced/setting-components';
import { TextInput, Switch } from 'jimu-ui';
import { IMConfig } from './config';

export default function Setting(props: { config: IMConfig; onSettingChange: any }) {
  const { config, onSettingChange } = props;
  return (
    <>
      <SettingSection title="Data source (List)">
        <SettingRow>
          <DataSourceSelector
            types={AllDataSourceTypes.FeatureLayer}
            useDataSources={config.listDataSourceId ? [{ dataSourceId: config.listDataSourceId }] : []}
            onChange={(useSources) =>
              onSettingChange({
                config: config.set('listDataSourceId', useSources?.[0]?.dataSourceId)
              })
            }
          />
        </SettingRow>
      </SettingSection>

      <SettingSection title="Directions target (optional)">
        <SettingRow label="Directions widget ID">
          <TextInput
            value={config.directionsWidgetId || ''}
            onChange={(_, v) => onSettingChange({ config: config.set('directionsWidgetId', v) })}
            placeholder="(optional) widget_XX"
          />
        </SettingRow>
        <SettingRow label="Auto-route on select">
          <Switch
            checked={!!config.autoRoute}
            onChange={(_, v) => onSettingChange({ config: config.set('autoRoute', v) })}
          />
        </SettingRow>
      </SettingSection>
    </>
  );
}


Please let me know if this helps.

Regards,

Venkat

 

 




0 Kudos
JasonFitzsimmons
Frequent Contributor

Hello @VenkataKondepati  and thanks again. I am going through your ideas here. I am trying some of the simpler ideas first to see if they work. I will save your code snippet too. 

One small thing - when you mention using Map Viewer, I assume you mean to open the map in Web Editor?


Also, regarding "Append/Copy Features (GP/Analysis) with a WHERE/selection → run from a button", are you referring to Experience Builder? 



I clarified something in my original post - Ideally I will add the selected multiple collection of features as a single feature into the target layer. 

 

 

0 Kudos
VenkataKondepati
Regular Contributor

Yes, by Map Viewer I meant the Web Map Editor. And for the append/copy workflow, yes that would typically be built as a custom action or widget in Experience Builder. Your clarification makes sense; grouping selected features into one before appending would need some custom logic.

 
 
 
0 Kudos
JasonFitzsimmons
Frequent Contributor

ok thanks @VenkataKondepati :  I did find a way from another post how to create a feature from multiple feature in Web Editor:


1. copy each feature individually

2. then in new layer, select all the features and merge

 

Thanks again for all your help! 

ccapizzano
New Contributor

Hi @JasonFitzsimmons , would you be able to forward the post you are referring to above that allows users to create a feature from multiple features in Web Editor?

0 Kudos
JasonFitzsimmons
Frequent Contributor

hi, it really is only what I wrote above:

1. copy each feature individually and paste one by one into target layer

2. then in new layer, select all the newly copied pasted features and use merge tool

It's a little tedious but it works. 

I can write it out in more detail if you like. THe keys are -you can only copy and paste one feature at a time in Web Editor (and you only need to fill in your attributes for one of the copied features, see (2)),  and 2. Once they are all copied into the target layer, you can select them all...then choose the attributes you want from only one of the copied features to be the attribute values for the single new merged feature 

0 Kudos
AlixVezina
Esri Regular Contributor

@ccapizzano @JasonFitzsimmons  the Web Editor now also supports copy pasting multiple features at once between different layers. The pasted features remain selected so you can merge them right away! See> What's New in ArcGIS Web Editor (October 2025)