<?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 Retrieve field values from selected row(s) in TableControl in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024223#M6132</link>
    <description>&lt;P&gt;I want to retrieve all, or just some value(s) from a selected row, or multiple, in a TableControl.&lt;/P&gt;&lt;P&gt;Meaning, on click of a button the TableControl is checked for selected rows and based on the result a couple of values, or the values from all fields should be returned.&lt;/P&gt;&lt;P&gt;How can I do that?&lt;/P&gt;</description>
    <pubDate>Sun, 07 Feb 2021 20:38:37 GMT</pubDate>
    <dc:creator>TomGeo</dc:creator>
    <dc:date>2021-02-07T20:38:37Z</dc:date>
    <item>
      <title>Retrieve field values from selected row(s) in TableControl</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024223#M6132</link>
      <description>&lt;P&gt;I want to retrieve all, or just some value(s) from a selected row, or multiple, in a TableControl.&lt;/P&gt;&lt;P&gt;Meaning, on click of a button the TableControl is checked for selected rows and based on the result a couple of values, or the values from all fields should be returned.&lt;/P&gt;&lt;P&gt;How can I do that?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 20:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024223#M6132</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2021-02-07T20:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve field values from selected row(s) in TableControl</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024233#M6133</link>
      <description>&lt;P&gt;I think I found a way, but I am not certain it's the correct one.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;get the selected object id(s) from the TableControl&lt;/LI&gt;&lt;LI&gt;check the existence of the requested fields, and get their index values&lt;/LI&gt;&lt;LI&gt;iterate over the selected object id(s), while feeding an Inspector&lt;OL&gt;&lt;LI&gt;LoadAsync(MapMember, ObjectID)&lt;/LI&gt;&lt;LI&gt;Inspector[FieldIndex] to get the field value&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Is that as it should be, or do I overcomplicate things?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 22:10:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024233#M6133</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2021-02-07T22:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve field values from selected row(s) in TableControl</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024255#M6134</link>
      <description>&lt;P&gt;get the selected features into a list with:&lt;BR /&gt;var selectedFeatures = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetSelection();&lt;BR /&gt;&lt;BR /&gt;Then iterate through each (it will give you 3 iterations if you have selected features within 3 layers, even if more than 1 item is selected within a layer)&lt;BR /&gt;&lt;BR /&gt;foreach (var selection in selectedFeatures)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; var inspector = new ArcGIS.Desktop.Editing.Attributes.Inspector();&lt;BR /&gt;&amp;nbsp; // The inspector will contain an array of layers (with 1 or more feature in each)&lt;BR /&gt;&amp;nbsp; inspector.Load(selection.Key, selection.Value);&lt;BR /&gt;&amp;nbsp; foreach (long oneObjectId in selection.Value)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&amp;nbsp; &amp;nbsp; &amp;nbsp; var inInsp = new ArcGIS.Desktop.Editing.Attributes.Inspector();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;inInsp.Load(selection.Key, oneObjectId);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//you can now use mystring=inInsp["STREETNAME"];&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 03:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024255#M6134</guid>
      <dc:creator>FredericPoliart_EsriAU</dc:creator>
      <dc:date>2021-02-08T03:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve field values from selected row(s) in TableControl</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024412#M6136</link>
      <description>&lt;P&gt;So, the way I was describing before is the way to go.&lt;/P&gt;&lt;P&gt;Thanks Frederic&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 16:07:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/retrieve-field-values-from-selected-row-s-in/m-p/1024412#M6136</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2021-02-08T16:07:08Z</dc:date>
    </item>
  </channel>
</rss>

