<?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 Queries using GUID fields - strange behavior in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/queries-using-guid-fields-strange-behavior/m-p/582378#M5015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using GUID fields in one of our new apps to store primary/secondary keys.&amp;nbsp; In the past we've used GUID/UUID but stored them in plain old text fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When querying this data in the ArcGIS Runtime using an AGSQuery object we are running into some strange behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we select a GUID field out as an NSString or NSUUID object it returns something like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9f6d8cac-19b4-4e24-af96-4654aac8287e&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this is not quite the same as GUIDs when viewed in ArcGIS - they don't have the curly brackets {}.&amp;nbsp; The strange thing is that if I then try to use this value in a query, say to get all records for a feature with this primary key, I have to manually add the brackets back in like so:&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #3d1d81;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;whereClause&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = [&lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;NSString&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;stringWithFormat&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d12f1b;"&gt;@"SurveyID = '{%@}'"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;surveyID&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;uppercaseString&lt;SPAN style="color: #000000;"&gt;]];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Note that in addition to manually adding the curly brackets back in, I've also had to convert the string to upper case.&amp;nbsp; If I don't do this I have to use the LIKE operator instead of =.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea why GUID fields are behaving so strangely?&amp;nbsp; I'm worried that records I create in the mobile app using a new UUID (iOS version of GUID) won't check in correctly, or the value will be altered when checked in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas why the query behavior of this data type is so inconsistent?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2015 00:41:02 GMT</pubDate>
    <dc:creator>MichaelDavis3</dc:creator>
    <dc:date>2015-12-23T00:41:02Z</dc:date>
    <item>
      <title>Queries using GUID fields - strange behavior</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/queries-using-guid-fields-strange-behavior/m-p/582378#M5015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using GUID fields in one of our new apps to store primary/secondary keys.&amp;nbsp; In the past we've used GUID/UUID but stored them in plain old text fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When querying this data in the ArcGIS Runtime using an AGSQuery object we are running into some strange behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we select a GUID field out as an NSString or NSUUID object it returns something like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9f6d8cac-19b4-4e24-af96-4654aac8287e&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this is not quite the same as GUIDs when viewed in ArcGIS - they don't have the curly brackets {}.&amp;nbsp; The strange thing is that if I then try to use this value in a query, say to get all records for a feature with this primary key, I have to manually add the brackets back in like so:&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo; color: #3d1d81;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;whereClause&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = [&lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;NSString&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;stringWithFormat&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d12f1b;"&gt;@"SurveyID = '{%@}'"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;surveyID&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;uppercaseString&lt;SPAN style="color: #000000;"&gt;]];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Note that in addition to manually adding the curly brackets back in, I've also had to convert the string to upper case.&amp;nbsp; If I don't do this I have to use the LIKE operator instead of =.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea why GUID fields are behaving so strangely?&amp;nbsp; I'm worried that records I create in the mobile app using a new UUID (iOS version of GUID) won't check in correctly, or the value will be altered when checked in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas why the query behavior of this data type is so inconsistent?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 00:41:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/queries-using-guid-fields-strange-behavior/m-p/582378#M5015</guid>
      <dc:creator>MichaelDavis3</dc:creator>
      <dc:date>2015-12-23T00:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Queries using GUID fields - strange behavior</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/queries-using-guid-fields-strange-behavior/m-p/582379#M5016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reporting. We've taken note of this and will let you know when we look into it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 18:54:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/queries-using-guid-fields-strange-behavior/m-p/582379#M5016</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2016-02-05T18:54:39Z</dc:date>
    </item>
  </channel>
</rss>

