<?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 Save feature with GUID field to local SQLite geodatabase in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/save-feature-with-guid-field-to-local-sqlite/m-p/312761#M2765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the 10.2.2 version of the SDK and working with the offline editing capabilities.&amp;nbsp; The particular layer I am working with has a GUID type field in addition to the GlobalID field.&amp;nbsp; When I try to save a new AGSGDBFeature to the AGSGDBFeatureTable the app crashes.&amp;nbsp; I have been able to successfully save to that layer without supplying a value for the GUID field.&amp;nbsp; SQLite does not have a GUID datatype.&amp;nbsp; When Server for ArcGIS generates the geodatabase it represents GUID field types as uuidtext custom type in SQLite.&amp;nbsp; The name suggests that this is a text type field.&amp;nbsp; If I open the geodatabase in SQLite Manager (Firefox add-in) I can successfully paste a GUID string into the edit dialog for a row and save.&amp;nbsp; This tells me that it is not a SQLite error.&amp;nbsp; I'm wondering if anyone else has tried this yet and if this may be a bug in the SDK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGDBFeatureTable* fbFeatTable = [self.geodatabase featureTableForLayerID:1]; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (fbFeatTable.canCreate &amp;amp;&amp;amp; fbFeatTable.canUpdate) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGDBFeature* feature = [[AGSGDBFeature alloc] initWithTable:fbFeatTable];&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // I've tried these variations &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[feature setAttribute:[NSUUID UUID] forKey:@"RecGuid"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[feature setAttribute:[[NSUUID UUID] UUIDString] forKey:@"RecGuid"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[feature setAttribute:[NSString stringWithFormat:@"{%@}", [[NSUUID UUID] UUIDString]] forKey:@"RecGuid"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [feature setAttributeWithString:[NSString stringWithFormat:@"{%@}", [[NSUUID UUID] UUIDString]] forKey:@"RecGuid"];&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [feature setAttributeWithString:@"Test1" forKey:@"aaa"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [feature setGeometry:geometry]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSError* saveError; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ([fbFeatTable saveFeature:feature error:&amp;amp;saveError])&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Saved."); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Error Saving: %@", saveError); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"%@ does not allow new features.", fbFeatTable.tableName); &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Justin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Mar 2014 11:32:12 GMT</pubDate>
    <dc:creator>JustinBurns1</dc:creator>
    <dc:date>2014-03-31T11:32:12Z</dc:date>
    <item>
      <title>Save feature with GUID field to local SQLite geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/save-feature-with-guid-field-to-local-sqlite/m-p/312761#M2765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the 10.2.2 version of the SDK and working with the offline editing capabilities.&amp;nbsp; The particular layer I am working with has a GUID type field in addition to the GlobalID field.&amp;nbsp; When I try to save a new AGSGDBFeature to the AGSGDBFeatureTable the app crashes.&amp;nbsp; I have been able to successfully save to that layer without supplying a value for the GUID field.&amp;nbsp; SQLite does not have a GUID datatype.&amp;nbsp; When Server for ArcGIS generates the geodatabase it represents GUID field types as uuidtext custom type in SQLite.&amp;nbsp; The name suggests that this is a text type field.&amp;nbsp; If I open the geodatabase in SQLite Manager (Firefox add-in) I can successfully paste a GUID string into the edit dialog for a row and save.&amp;nbsp; This tells me that it is not a SQLite error.&amp;nbsp; I'm wondering if anyone else has tried this yet and if this may be a bug in the SDK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGDBFeatureTable* fbFeatTable = [self.geodatabase featureTableForLayerID:1]; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (fbFeatTable.canCreate &amp;amp;&amp;amp; fbFeatTable.canUpdate) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGDBFeature* feature = [[AGSGDBFeature alloc] initWithTable:fbFeatTable];&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // I've tried these variations &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[feature setAttribute:[NSUUID UUID] forKey:@"RecGuid"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[feature setAttribute:[[NSUUID UUID] UUIDString] forKey:@"RecGuid"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //[feature setAttribute:[NSString stringWithFormat:@"{%@}", [[NSUUID UUID] UUIDString]] forKey:@"RecGuid"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [feature setAttributeWithString:[NSString stringWithFormat:@"{%@}", [[NSUUID UUID] UUIDString]] forKey:@"RecGuid"];&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [feature setAttributeWithString:@"Test1" forKey:@"aaa"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [feature setGeometry:geometry]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSError* saveError; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ([fbFeatTable saveFeature:feature error:&amp;amp;saveError])&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Saved."); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Error Saving: %@", saveError); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"%@ does not allow new features.", fbFeatTable.tableName); &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Justin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 11:32:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/save-feature-with-guid-field-to-local-sqlite/m-p/312761#M2765</guid>
      <dc:creator>JustinBurns1</dc:creator>
      <dc:date>2014-03-31T11:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Save feature with GUID field to local SQLite geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/save-feature-with-guid-field-to-local-sqlite/m-p/312762#M2766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Justin, can you attach the .geodatabase you're using? We'll try this out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 17:03:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/save-feature-with-guid-field-to-local-sqlite/m-p/312762#M2766</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2014-04-07T17:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Save feature with GUID field to local SQLite geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/save-feature-with-guid-field-to-local-sqlite/m-p/312763#M2767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for reporting this issue. It will be resolved in the upcoming release (v10.2.3).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 00:00:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/save-feature-with-guid-field-to-local-sqlite/m-p/312763#M2767</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2014-04-16T00:00:51Z</dc:date>
    </item>
  </channel>
</rss>

