<?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: Get OIDs of features selected using Select Widget WAB in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-oids-of-features-selected-using-select-widget/m-p/1052631#M20756</link>
    <description>&lt;P&gt;I found multiple solution for this one.&lt;BR /&gt;1- You can get OID of features selected from Select widget by running this function.&lt;/P&gt;&lt;P&gt;var ids = [];&lt;BR /&gt;array.forEach(this.map.itemInfo.itemData.operationalLayers, function (layer) {&lt;BR /&gt;var featureLayer = layer.layerObject;&lt;BR /&gt;array.forEach(featureLayer.getSelectedFeatures(), function (feature) {&lt;BR /&gt;ids.push(feature.attributes[featureLayer.objectIdField]);&lt;BR /&gt;}&lt;BR /&gt;}, this);&lt;BR /&gt;}, this)&lt;BR /&gt;&lt;BR /&gt;2- The other way is to use popup window but for this to work you have to configure you popup to show OID&lt;/P&gt;&lt;P&gt;array.forEach(this.map.graphics.graphics,function(graphic){&lt;BR /&gt;var result = graphic.getLayer();&lt;BR /&gt;var info = result._map.attribution.map.infoWindow.domNode.innerText.split('\n');&lt;BR /&gt;var count = info.length;&lt;BR /&gt;if (count &amp;gt; 1 ) {&lt;BR /&gt;var oid = info[2].split('\t')[1];&lt;BR /&gt;}&lt;BR /&gt;})&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 09:13:55 GMT</pubDate>
    <dc:creator>fahadrasheed</dc:creator>
    <dc:date>2021-04-29T09:13:55Z</dc:date>
    <item>
      <title>Get OIDs of features selected using Select Widget WAB</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-oids-of-features-selected-using-select-widget/m-p/581686#M15532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wab javascript dev editon‌&amp;nbsp;widget.js&amp;nbsp;widjets&amp;nbsp;web appbuilder cus&amp;nbsp;web appbuilder fo arcgis&lt;/P&gt;&lt;P&gt;Hi,&lt;BR /&gt;I'm making a customized WebApp using ArcGIS WAB. Customization include making some widgets and some non esri webapps which will perform some specific task on features selected on webapp using Select Widget.&lt;BR /&gt;All i'm trying here is to get OIDs of the selected features using a customized widget or a JavaScript code so i can pass those OIDs to my non esri webapps to perform some functions on data.&amp;nbsp;&lt;BR /&gt;Any sort of help is much appreciated, because i'm tired of searching for solution of this small task on internet and finding nothing at all.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 05:33:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-oids-of-features-selected-using-select-widget/m-p/581686#M15532</guid>
      <dc:creator>fahadrasheed</dc:creator>
      <dc:date>2020-10-16T05:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get OIDs of features selected using Select Widget WAB</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-oids-of-features-selected-using-select-widget/m-p/1052631#M20756</link>
      <description>&lt;P&gt;I found multiple solution for this one.&lt;BR /&gt;1- You can get OID of features selected from Select widget by running this function.&lt;/P&gt;&lt;P&gt;var ids = [];&lt;BR /&gt;array.forEach(this.map.itemInfo.itemData.operationalLayers, function (layer) {&lt;BR /&gt;var featureLayer = layer.layerObject;&lt;BR /&gt;array.forEach(featureLayer.getSelectedFeatures(), function (feature) {&lt;BR /&gt;ids.push(feature.attributes[featureLayer.objectIdField]);&lt;BR /&gt;}&lt;BR /&gt;}, this);&lt;BR /&gt;}, this)&lt;BR /&gt;&lt;BR /&gt;2- The other way is to use popup window but for this to work you have to configure you popup to show OID&lt;/P&gt;&lt;P&gt;array.forEach(this.map.graphics.graphics,function(graphic){&lt;BR /&gt;var result = graphic.getLayer();&lt;BR /&gt;var info = result._map.attribution.map.infoWindow.domNode.innerText.split('\n');&lt;BR /&gt;var count = info.length;&lt;BR /&gt;if (count &amp;gt; 1 ) {&lt;BR /&gt;var oid = info[2].split('\t')[1];&lt;BR /&gt;}&lt;BR /&gt;})&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 09:13:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/get-oids-of-features-selected-using-select-widget/m-p/1052631#M20756</guid>
      <dc:creator>fahadrasheed</dc:creator>
      <dc:date>2021-04-29T09:13:55Z</dc:date>
    </item>
  </channel>
</rss>

