<?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: Set up a widget output data source without OriginDataSources in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323967#M8147</link>
    <description>&lt;P&gt;Hi Jakub,&lt;/P&gt;&lt;P&gt;Big thanks for your suggestions! I tried&amp;nbsp;using the FeatureDataRecordImpl method from 'jimu-core/data-source' and it worked perfectly. Just wondering how did you come up with this method, I could not find it in the documentation (which really is not very friendly).&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Catherine&lt;/P&gt;</description>
    <pubDate>Wed, 30 Aug 2023 16:06:24 GMT</pubDate>
    <dc:creator>clc</dc:creator>
    <dc:date>2023-08-30T16:06:24Z</dc:date>
    <item>
      <title>Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1288302#M6933</link>
      <description>&lt;P&gt;I am developing a very simple widget that generates a feature layer. This widget does not have any setting file as it does not require any input data sources. I would like to create an output data source with the feature layer data. Here is the beginning of my widget.tsx code:&lt;/P&gt;&lt;P&gt;const [myDSout, setMyDSout] = useState&amp;lt;FeatureLayerDataSource&amp;gt;(null)&lt;/P&gt;&lt;P&gt;const outputDsJsons: DataSourceJson[] = [{&lt;BR /&gt;id: "widget_1_ouput",&lt;BR /&gt;isOutputFromWidget: true,&lt;BR /&gt;isDataInDataSourceInstance: true,&lt;BR /&gt;label: "MyDSoutput",&lt;BR /&gt;type: "FEATURE_LAYER"&lt;BR /&gt;}]&lt;BR /&gt;DataSourceManager.getInstance().createDataSource(outputDsJsons[0]).then((result: FeatureLayerDataSource) =&amp;gt; {&lt;BR /&gt;setMyDSout(result);&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;I got the following message:&amp;nbsp;"Datasource without origin data source must save the schema in app config"&lt;/P&gt;&lt;P&gt;I have manually modified the entry for&amp;nbsp;"widget_1_ouput" in the dataSources section of the config file of my app (the one found in the server\public\apps\3\resources\config) with an entry schema without any effects.&lt;/P&gt;&lt;P&gt;Obviously this is not the right approach, so here is my question: What is the right way to save a schema in an app config?&lt;/P&gt;&lt;P&gt;Thanks for any comments.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 18:26:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1288302#M6933</guid>
      <dc:creator>clc</dc:creator>
      <dc:date>2023-05-11T18:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1320545#M8037</link>
      <description>&lt;P&gt;Hi Catherine, I'm facing the same problem. Were you able to save the schema in the app config ?&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 08:21:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1320545#M8037</guid>
      <dc:creator>jsilhavy</dc:creator>
      <dc:date>2023-08-21T08:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1322211#M8093</link>
      <description>&lt;P&gt;Hi Jakub,&lt;/P&gt;&lt;P&gt;Yes I finally came up with a solution: The implementation of&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &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&lt;SPAN&gt;schema&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;idField&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"objectid"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;fields&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; {......&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; .....&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;should be placed in the setting.tsx file. Then, just as the Esri example, l&lt;/SPAN&gt;&lt;SPAN&gt;et the framework knows which data source current widget is using and which data source current widget is outputing.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;props&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;onSettingChange&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;props&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;useDataSources&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; []&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }, &lt;/SPAN&gt;&lt;SPAN&gt;outputDsJsons&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;Finally in the widget.tsx file, you can build your records and set them to the output datasource.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;Let me know if my explanations are cleared enough, thanks.&lt;/DIV&gt;&lt;DIV&gt;Catherine&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Aug 2023 16:37:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1322211#M8093</guid>
      <dc:creator>clc</dc:creator>
      <dc:date>2023-08-24T16:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323426#M8127</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;Catherine,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;BR /&gt;Yes, I managed to set up the output datasource according to your instructions. And also by following the DataSourceJson datatype.&lt;BR /&gt;The other widgets now see my output datasource and&lt;BR /&gt;the attribute table is able to configure it successfully.&lt;/P&gt;&lt;P&gt;I am unable to set the data to the output datasource.&lt;BR /&gt;I have tried calling the following output datastore methods&lt;BR /&gt;setSourceRecords()&lt;BR /&gt;setRecord()&lt;/P&gt;&lt;P&gt;according to documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/experience-builder/guide/core-concepts/data-source/#widget-output-data-source" target="_blank"&gt;https://developers.arcgis.com/experience-builder/guide/core-concepts/data-source/#widget-output-data-source&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But the attribute table does not display any data.&lt;BR /&gt;I also tried calling the recommended method&lt;BR /&gt;addSourceVersion()&lt;/P&gt;&lt;P&gt;What method did you use to set the data in the output datasource?&lt;/P&gt;&lt;P&gt;Can you attach a code sample?&lt;BR /&gt;Thank you.&lt;BR /&gt;Regards.&lt;BR /&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 13:09:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323426#M8127</guid>
      <dc:creator>jsilhavy</dc:creator>
      <dc:date>2023-08-29T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323442#M8129</link>
      <description>&lt;P&gt;Hi Cathrine,&lt;/P&gt;&lt;P&gt;I finally made it!&lt;BR /&gt;It helped me to call the &lt;SPAN&gt;updateSourceByFeatures()&lt;/SPAN&gt; method to set the data&lt;BR /&gt;and update the datastore status to force the Attribute table to display the data:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featureLayerDs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;setStatus&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DataSourceStatus&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Unloaded&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;Jakub&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Aug 2023 13:35:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323442#M8129</guid>
      <dc:creator>jsilhavy</dc:creator>
      <dc:date>2023-08-29T13:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323608#M8137</link>
      <description>&lt;P&gt;Hi Jakub,&lt;/P&gt;&lt;P&gt;Glad to read it's working for you. I am curious to see how you use the&amp;nbsp;&lt;SPAN&gt;updateSourceByFeatures()&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am including a very simple demo widget that shows how I implement output datasource. This approach works for me in the developer environment (and in the downloaded experience) but I have still a problem. When I add this widget to our portal, it does not work. I am getting this cryptic error message: "Uncaught TypeError: t.buildRecord is not a function". Do you encounter the same?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Catherine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 18:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323608#M8137</guid>
      <dc:creator>clc</dc:creator>
      <dc:date>2023-08-29T18:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323795#M8141</link>
      <description>&lt;P&gt;Hi Cathrine,&lt;/P&gt;&lt;P&gt;thank you for your sample.&lt;/P&gt;&lt;P&gt;I am not using the buildRecord() method, so I do not encouter this problem.&lt;/P&gt;&lt;P&gt;Based on your error message, it looks like you are not getting the DataSource object using the getOutputDataSource method.&lt;BR /&gt;The error says that the buildRecord method does not exist on the object you get.&lt;/P&gt;&lt;P&gt;I would try setting a breakpoint on that line and see what the minified variable t is.&lt;BR /&gt;Or put a control statement in the console:&lt;BR /&gt;console.log(getOutputDataSource().id) to see if it finds the correct data source.&lt;BR /&gt;Or try creating a Recod using the FeatureDataRecordImpl method from 'jimu-core/data-source',&amp;nbsp;for example:&lt;BR /&gt;const record = new FeatureDataRecordImpl(myline1, getOutputDataSource());&lt;BR /&gt;But I think the problem is in getting the output datasource.&lt;BR /&gt;Good luck.&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 08:43:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323795#M8141</guid>
      <dc:creator>jsilhavy</dc:creator>
      <dc:date>2023-08-30T08:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323967#M8147</link>
      <description>&lt;P&gt;Hi Jakub,&lt;/P&gt;&lt;P&gt;Big thanks for your suggestions! I tried&amp;nbsp;using the FeatureDataRecordImpl method from 'jimu-core/data-source' and it worked perfectly. Just wondering how did you come up with this method, I could not find it in the documentation (which really is not very friendly).&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Catherine&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 16:06:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1323967#M8147</guid>
      <dc:creator>clc</dc:creator>
      <dc:date>2023-08-30T16:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set up a widget output data source without OriginDataSources</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1324232#M8151</link>
      <description>&lt;P&gt;Hi Catherine,&lt;BR /&gt;I'm glad you made it.&lt;/P&gt;&lt;P&gt;This method was recommended to me by my colleague&amp;nbsp;who found it somewhere in the source code of Experience builder.&amp;nbsp;Yes, the documentation is not very helpful.&lt;/P&gt;&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 07:29:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/m-p/1324232#M8151</guid>
      <dc:creator>jsilhavy</dc:creator>
      <dc:date>2023-08-31T07:29:50Z</dc:date>
    </item>
  </channel>
</rss>

