<?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: Create an unlinked copy of data in datasource from settings in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1640738#M20387</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/916608"&gt;@jsu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;To achieve your goal, you don’t need to create a copy of the data source, because the original and the copy share the same service/item. Once you call &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/apply-edits-feature-service/" target="_blank" rel="noopener"&gt;apply edits&lt;/A&gt;, the changes will also be reflected on ArcGIS Online. Instead, you can try&lt;SPAN&gt;&amp;nbsp;"&lt;A href="https://developers.arcgis.com/experience-builder/api-reference/jimu-core/DataSource/#setRecords" target="_blank" rel="noopener"&gt;ogds.setRecords()&lt;/A&gt;" to update the loaded records only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Yueyang&lt;/P&gt;</description>
    <pubDate>Mon, 11 Aug 2025 02:25:13 GMT</pubDate>
    <dc:creator>YueyangLi</dc:creator>
    <dc:date>2025-08-11T02:25:13Z</dc:date>
    <item>
      <title>Create an unlinked copy of data in datasource from settings</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1639739#M20335</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a simple custom widget that works like the following:&lt;/P&gt;&lt;P&gt;- In the Settings, the user can select an item (a featureclass / layer) from ArcGIS Online&amp;nbsp;&lt;/P&gt;&lt;P&gt;- In the actual widget during runtime, when the user presses the button in the widget, the widget adds onto the map the exact same features as that featureclass / layer but without it being linked to that ArcGIS Online featureclass (i.e. any changes i make in experience builder I DO NOT want it to show up on ArcGIS Online).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the added data to also be editable and accessible by other widgets, so I think that means I have to create a new datasource. Currently in my widget.tsx I have the following sort of function for when the button is pressed:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const handleAddLayer = (evt) =&amp;gt;  {
        evt.preventDefault() 
        console.log()
        console.log("YAY Button Pressed")

        const dsManager = DataSourceManager.getInstance()

        dsManager.createAllDataSources().then(()=&amp;gt;{
            if (props.useDataSources.length &amp;gt;= 1) {
                for (let i = 0; i &amp;lt; props.useDataSources.length; i++) {
                    const dsSource = props.useDataSources[i]
                    const ogds = dsManager.getDataSource(dsSource.dataSourceId)
                    const ogJson = ogds.getDataSourceJson()
                    
                    //New ID
                    const newid = dsSource.dataSourceId + '_copy_' + Date.now()
                    
                    //Create New Datasource 
                    dsManager.createDataSource({
                        id: newid,
                        dataSourceJson: ogJson
                    })
                }    
            }
        })
    }&lt;/LI-CODE&gt;&lt;P&gt;Currently I haven't added the code to add the map (which I will do later), but I keep getting an error that I'm failing to create the datasource and I'm not sure why. If someone can offer some insight and help me out that would be greatly appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2025 16:56:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1639739#M20335</guid>
      <dc:creator>jsu</dc:creator>
      <dc:date>2025-08-06T16:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create an unlinked copy of data in datasource from settings</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1640252#M20371</link>
      <description>&lt;P&gt;Code seems good.&lt;/P&gt;&lt;P&gt;Error messages and snapshots will help.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 02:04:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1640252#M20371</guid>
      <dc:creator>Allen_Zhang</dc:creator>
      <dc:date>2025-08-08T02:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create an unlinked copy of data in datasource from settings</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1640738#M20387</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/916608"&gt;@jsu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;To achieve your goal, you don’t need to create a copy of the data source, because the original and the copy share the same service/item. Once you call &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/apply-edits-feature-service/" target="_blank" rel="noopener"&gt;apply edits&lt;/A&gt;, the changes will also be reflected on ArcGIS Online. Instead, you can try&lt;SPAN&gt;&amp;nbsp;"&lt;A href="https://developers.arcgis.com/experience-builder/api-reference/jimu-core/DataSource/#setRecords" target="_blank" rel="noopener"&gt;ogds.setRecords()&lt;/A&gt;" to update the loaded records only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Yueyang&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 02:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1640738#M20387</guid>
      <dc:creator>YueyangLi</dc:creator>
      <dc:date>2025-08-11T02:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create an unlinked copy of data in datasource from settings</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1644897#M20579</link>
      <description>&lt;P&gt;But it sounded like he did not want it applied to AGOL, or at least not applied as an edit to the Layer?&lt;BR /&gt;&lt;BR /&gt;This sounds like creating a 'collection bucket' feature service, which might be able to have the same data structures (individual features) copied into or referenced, might be what is being attempted here.&lt;BR /&gt;&lt;BR /&gt;it's interesting though.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 20:57:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/create-an-unlinked-copy-of-data-in-datasource-from/m-p/1644897#M20579</guid>
      <dc:creator>TimWestern</dc:creator>
      <dc:date>2025-08-22T20:57:24Z</dc:date>
    </item>
  </channel>
</rss>

