<?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: Invalid index for field: [fieldname] in Layer: [layername]	 in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350367#M3005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see any reason why you shouldn't be able to sync back a replica even when the online database schema has changed (for example adding more fields to a table). If the new fields are nullable or have a default value, then there should be no problem to sync the data back. The problem currently comes from the fact that you iterate the attributes on the &lt;STRONG&gt;server side&lt;/STRONG&gt; and not from the replica when syncing the changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also modifying the Layer ID numbers shouln't break the sync because you cannot add two layers/tables with the same name to the service. Therefore the &lt;STRONG&gt;name&lt;/STRONG&gt; of the layer/table should be the identifier and not the Layer ID (which will change eventually).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jul 2016 06:27:46 GMT</pubDate>
    <dc:creator>JuhoVainio</dc:creator>
    <dc:date>2016-07-11T06:27:46Z</dc:date>
    <item>
      <title>Invalid index for field: [fieldname] in Layer: [layername]</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350364#M3002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We´re using AGSGDB for offline features in our app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We´ve added a field on our server side database. On such an event, the app detects a change in schema, does a full sync-recreate offline database cycle in order to be able to present this new field in the offline database. This has been working good for us, but now one of the clients are struggling syncing back features to the feature layer with the new field ("MaltAntPl"). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following server log message seem to correlate with this particular client:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEVERE&lt;/P&gt;&lt;P&gt;Invalid index for field: MaltAntPl in Layer: Planting.&lt;/P&gt;&lt;P&gt;System/SyncTools.GPServer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if related, but we are also tracking the users "last login date", and here we see that the device probably has a bad Date&amp;amp;Time and Locale setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what may cause this?&lt;/P&gt;&lt;P&gt;-Any tips on how we can get new fields in the offline GDB without a full re-create?:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Kristoffer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 07:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350364#M3002</guid>
      <dc:creator>KristofferStenersen</dc:creator>
      <dc:date>2015-06-30T07:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid index for field: [fieldname] in Layer: [layername]</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350365#M3003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case you haven't found out a solution, this might help you:&lt;/P&gt;&lt;P&gt;Check the offline GDB file's &lt;STRONG&gt;GDB_Items&lt;/STRONG&gt; table and the &lt;STRONG&gt;Definition&lt;/STRONG&gt; column. There you can see an xml data which contains an element &lt;STRONG&gt;LayerID&lt;/STRONG&gt;. That ID must match the ID on the ArcGIS server or the sync will fail to "invalid index" error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my opinion the error message should be clear as to what actually is happening on the server side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 09:53:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350365#M3003</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2016-06-10T09:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid index for field: [fieldname] in Layer: [layername]     </title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350366#M3004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is `&lt;SPAN style="color: #000000; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;MaltAntPl` a datetime field?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;When you say "&lt;SPAN style="color: #000000; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;device probably has a bad Date&amp;amp;Time and Locale setting",&amp;nbsp; how is it bad? Whatever be the locale of the device, the datetime is stored in UTC in the geodatabase.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;We don't support altering the schema of the geodatabase on the fly. Replicas created from a feature service are tied to the db schema they were created with, and the definition of what data to include in the replica. You cannot later change the schema and expect existing replicas to continue working. Nor can you redefine an existing replica to update its schema or expand the scope of its data (for ex, the geographic extent, or layers, etc). &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 17:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350366#M3004</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2016-07-08T17:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid index for field: [fieldname] in Layer: [layername]</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350367#M3005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see any reason why you shouldn't be able to sync back a replica even when the online database schema has changed (for example adding more fields to a table). If the new fields are nullable or have a default value, then there should be no problem to sync the data back. The problem currently comes from the fact that you iterate the attributes on the &lt;STRONG&gt;server side&lt;/STRONG&gt; and not from the replica when syncing the changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also modifying the Layer ID numbers shouln't break the sync because you cannot add two layers/tables with the same name to the service. Therefore the &lt;STRONG&gt;name&lt;/STRONG&gt; of the layer/table should be the identifier and not the Layer ID (which will change eventually).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2016 06:27:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/invalid-index-for-field-fieldname-in-layer/m-p/350367#M3005</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2016-07-11T06:27:46Z</dc:date>
    </item>
  </channel>
</rss>

