<?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 creating a unique GUID on a mobile device in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/creating-a-unique-guid-on-a-mobile-device/m-p/807520#M1515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say a feature class had a user created GUID field that was used as the foreign key in a related table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a new feature was created on a mobile device, is there any method in App Studio or the ESRI Qt runtime that would create a new unique GUID?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, alternatively, would there be any downside to seeding this custom field with the system generated GlobalId? I assume not, given that, even if the GlobalId changed later on (perhaps as this record might get extracted and reappended, etc), the chances (??) of another feature ever getting the same GlobalId as a previous feature should be minimal to non-existent??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realise that the second part of question is not expressly an App Studio question! But interested in anyone's comments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2017 20:39:51 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2017-02-13T20:39:51Z</dc:date>
    <item>
      <title>creating a unique GUID on a mobile device</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/creating-a-unique-guid-on-a-mobile-device/m-p/807520#M1515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say a feature class had a user created GUID field that was used as the foreign key in a related table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a new feature was created on a mobile device, is there any method in App Studio or the ESRI Qt runtime that would create a new unique GUID?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, alternatively, would there be any downside to seeding this custom field with the system generated GlobalId? I assume not, given that, even if the GlobalId changed later on (perhaps as this record might get extracted and reappended, etc), the chances (??) of another feature ever getting the same GlobalId as a previous feature should be minimal to non-existent??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realise that the second part of question is not expressly an App Studio question! But interested in anyone's comments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 20:39:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/creating-a-unique-guid-on-a-mobile-device/m-p/807520#M1515</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-02-13T20:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: creating a unique GUID on a mobile device</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/creating-a-unique-guid-on-a-mobile-device/m-p/807521#M1516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the first part of your question, there is a method in the AppFramework QML type called createUuidString()&amp;nbsp;which you can use to generate UUID/GUID strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#eeeeee" style="padding: 0;"&gt;&lt;P&gt;string &lt;SPAN style="font-weight: 600;"&gt;createUuidString&lt;/SPAN&gt;()&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;Creates a universally unique identifier (UUID) string; a 128-bit number to use as a way to identify a particular object or component. Without a defined format, defaults to using curly brackets and hyphens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#eeeeee" style="padding: 0;"&gt;&lt;P&gt;string &lt;SPAN style="font-weight: 600;"&gt;createUuidString&lt;/SPAN&gt;(int &lt;SPAN&gt;format&lt;/SPAN&gt;)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;Creates a universally unique identifier (UUID) string; a 128-bit number to use as a way to identify a particular object or component.&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;For example,&lt;/P&gt;&lt;PRE style="background-color: #f0f0f0; margin: 15px 85px 0px 35px;"&gt;&lt;SPAN style="background-color: #f0f0f0; font-weight: 600;"&gt;var currentItemUuid &lt;/SPAN&gt;&lt;SPAN style="font-weight: 600;"&gt;= AppFramework.createUuidString(1);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="background-color: #f0f0f0; margin: 0px 85px 15px 35px;"&gt;&lt;SPAN style="font-weight: 600;"&gt;var thisFilename = (currentItemFilename !== "") ? currentItemFilename + "_" + currentItemUuid : "export" + currentItemUuid;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;The format parameter.&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;0 to include curly brackets and hyphens, e.g. {3F2504E0-4F89-41D3-9A0C-0305E82C3301}. 1 to include hyphens but not curly brackets, e.g. 3F2504E0-4F89-41D3-9A0C-0305E82C3301. 2 to not include hyphens or curly brackets, e.g. 3F2504E04F8941D39A0C0305E82C3301.&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;For the second part, what I understand is that you want to know if there are any downsides of using the system generated GlobalID itself and copying it to the custom GUID field. It doesn't seem to have any major downside, apart from the possibility that the same number in multiple columns might be confusing. The GlobadID surely is&amp;nbsp;unique and the chances of any previous feature having the same Global ID are nearly non-existent.&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;Hope this helps.&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;Thanks,&lt;/P&gt;&lt;P style="margin: 15px 0px 10px 15px;"&gt;Anshuman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 01:27:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/creating-a-unique-guid-on-a-mobile-device/m-p/807521#M1516</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-02-14T01:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: creating a unique GUID on a mobile device</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/creating-a-unique-guid-on-a-mobile-device/m-p/807522#M1517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anshuman, that createUuidString method is exactly what I was after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 01:29:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/creating-a-unique-guid-on-a-mobile-device/m-p/807522#M1517</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-02-14T01:29:49Z</dc:date>
    </item>
  </channel>
</rss>

