<?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: Reorder Fields in Attribute table using ArcGIS Pro SDK in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523828#M11974</link>
    <description>&lt;P&gt;Ok, now I used the idea from the link you provided ... "Reordered field descriptions". What I did here is, I got the field description (list of field object) from the layer and reordered them in the new list of field descriptions...then I used the SetFieldDiscriptions method and now all looks good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would love to learn if there is another better option to reorder the &lt;STRONG&gt;layer&lt;/STRONG&gt; field in the attribute table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2024 16:01:18 GMT</pubDate>
    <dc:creator>Teddytedo</dc:creator>
    <dc:date>2024-08-19T16:01:18Z</dc:date>
    <item>
      <title>Reorder Fields in Attribute table using ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523238#M11969</link>
      <description>&lt;P&gt;Any API in ArcGIS Pro SDK to set the layer attribute field order. Manually Data Design used or Arcpy&amp;nbsp; also another option. However, I did not see any API in Arcpro SDK. I checked&amp;nbsp; &amp;nbsp;"SetFieldOrderAsync" but it required the active table view. But I plan to implement the order for many layers after adding the features to the map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the advice&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 15:22:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523238#M11969</guid>
      <dc:creator>Teddytedo</dc:creator>
      <dc:date>2024-08-17T15:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder Fields in Attribute table using ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523704#M11971</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look at the Community solution &lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-index-of-an-attribute/m-p/1236737#M9131" target="_self"&gt;here&lt;/A&gt;. Maybe it could help you.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 10:55:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523704#M11971</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-08-19T10:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder Fields in Attribute table using ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523730#M11972</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested in the layers on the map level, not the database level. The community solution has suggestions on database level but layer level.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 12:18:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523730#M11972</guid>
      <dc:creator>Teddytedo</dc:creator>
      <dc:date>2024-08-19T12:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder Fields in Attribute table using ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523828#M11974</link>
      <description>&lt;P&gt;Ok, now I used the idea from the link you provided ... "Reordered field descriptions". What I did here is, I got the field description (list of field object) from the layer and reordered them in the new list of field descriptions...then I used the SetFieldDiscriptions method and now all looks good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would love to learn if there is another better option to reorder the &lt;STRONG&gt;layer&lt;/STRONG&gt; field in the attribute table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 16:01:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1523828#M11974</guid>
      <dc:creator>Teddytedo</dc:creator>
      <dc:date>2024-08-19T16:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder Fields in Attribute table using ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1524092#M11979</link>
      <description>&lt;P&gt;I had no success with SetFieldOrderAsync.&amp;nbsp; I ended up with the same solution as you did.&amp;nbsp; Something like below:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;theCIMBaseLayer = layer.GetDefinition();
theCIMFeatLayer = (CIMFeatureLayer)theCIMBaseLayer;
theFieldDesc = theCIMFeatLayer.FeatureTable.FieldDescriptions;
theFieldList = theFieldDesc.ToList();

int theNum = 1;
theFieldDescNew = new CIMFieldDescription[theFieldDesc.Length];

foreach (CIMFieldDescription item in theFieldList)
{
    if (item.FieldName == "Name")
    {
        theFieldDescNew.SetValue(item, 0);
    }
    else
    {
        theFieldDescNew.SetValue(item, theNum);
    }
    theNum += 1;
}
theCIMFeatLayer.FeatureTable.FieldDescriptions = theFieldDescNew;
layer.SetDefinition(theCIMFeatLayer);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 22:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1524092#M11979</guid>
      <dc:creator>EricElder</dc:creator>
      <dc:date>2024-08-19T22:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder Fields in Attribute table using ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1524380#M11984</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15687"&gt;@EricElder&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great you tested that on your end. The&amp;nbsp;&lt;SPAN&gt;SetFieldOrderAsync only works if you have an active attribute view. I don't think it even updates the layer file once applied to the active attribute view.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 14:06:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/reorder-fields-in-attribute-table-using-arcgis-pro/m-p/1524380#M11984</guid>
      <dc:creator>Teddytedo</dc:creator>
      <dc:date>2024-08-20T14:06:37Z</dc:date>
    </item>
  </channel>
</rss>

