<?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: ArcPad and GUID fields in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40264#M287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue with that CQ will be supported in the new release of 10.0.3. In fact there should be a build going up on the ArcPad Beta site this week that you can try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest that you have unique DataSource, counters, recordsets and bookmark variables per layer. This way you can keep track of them indivually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sign up for the beta if you haven't already and if possible can you upload your project or atleast some of the code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gareth&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Oct 2011 21:48:16 GMT</pubDate>
    <dc:creator>GarethWalters</dc:creator>
    <dc:date>2011-10-02T21:48:16Z</dc:date>
    <item>
      <title>ArcPad and GUID fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40259#M282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;GUIDs or Global Unique Identifiers are a great way to ensure that you have unique primary keys in your database, especially when you have a multiple "offline" users updating and syncing their data back to your central repository.&amp;nbsp; Funny, but this is exactly what ArcPad is doing, but ArcPad doesn't handle GUIDs very well.&amp;nbsp; Specifically if you want to use scripting to update said GUID fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Several data models are moving to GUIDs as primary keys such as &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/downloads/datamodel/detail/25" rel="nofollow noopener noreferrer" target="_blank"&gt;APDM&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="http://www.pods.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;PODS&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically I would like to group a bunch of point features (Control Points) by a GUID (LineID).&amp;nbsp; I have incorrectly assumed that it would be an easy task of setting the Field.Value when the FORM onok event is fired.&amp;nbsp; I have used that method to set text fields and date fields for a long time now.&amp;nbsp; However GUID fields throw a "script error 800004005" related to not being able to access the data when you do.&amp;nbsp; Oddly, it does save the new value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;onok="Call SetVals( ThisEvent.Object )"&lt;/PRE&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Sub SetVals(obj)
 obj.Fields("COLLECTEDDATE").Value = now()
 obj.Fields("LINE_GUID").Value = UserProperties("LineGUID")
End Sub
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I backtracked and tried using the RecordSet fired with the "onfeatureadded" event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;onfeatureadded="'Call UpdateVals( ThisEvent )"&lt;/PRE&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Sub UpdateVals(this)
 dim currentRS
 set currentRS = this.Object.Records
 currentRS.Bookmark = this.Bookmark
 currentRS.Fields("COLLECTEDDATE").Value = now()
 currentRS.Fields("LINE_GUID").Value = UserProperties("LineGUID")
 this.Object.Records.Update
End Sub
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This method throws a "Error 800A01AD - ActiveX component can't create object" error.&amp;nbsp; The script dies and the Records.Update never happens so the value is not saved to the database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody got a different approach?&amp;nbsp; I can use text fields, but that will require more processing in the office to maintain compatibility with APDM or PODS.&amp;nbsp; I currently support 3-15 field crews working on a couple hundred pipelines a week and want (need) to automate the field collection process as much as possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Having the field monkeys manage the LineID/Primary Key does NOT work, don't even suggest it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:34:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40259#M282</guid>
      <dc:creator>RobertMcCann</dc:creator>
      <dc:date>2021-12-10T21:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad and GUID fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40260#M283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to stop arcpad from auto populating GUID fields, open a command window (ie right click on a layer and select "show data") and use the following SQL:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ALTER TABLE [tableName]
ALTER COLUMN [GUIDcolumn] DROP DEFAULT
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Upon checkout arcpad is setting the default of all GUID columns to "NewID()" which is a stored function in SQL to generate new GUID's.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this doesn't fix the errors I'm encountering in the first post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:34:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40260#M283</guid>
      <dc:creator>RobertMcCann</dc:creator>
      <dc:date>2021-12-10T21:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad and GUID fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40261#M284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, ESRI has confirmed that this is not possible &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp; Recommended workaround is to use text fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2011 20:05:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40261#M284</guid>
      <dc:creator>RobertMcCann</dc:creator>
      <dc:date>2011-09-12T20:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad and GUID fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40262#M285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I clarify a couple of things with your dataset?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have a related table scenario?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Related by a GlobalID and the GUID you are trying to update?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or a single feature class with a globalID and another column in that which is a GUID?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also assume that the data is in an AXF.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How about trying updating the rows through the Datasource object, then you can pass SQL queries through. This works well for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gareth&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2011 03:20:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40262#M285</guid>
      <dc:creator>GarethWalters</dc:creator>
      <dc:date>2011-09-13T03:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad and GUID fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40263#M286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Robert,&lt;BR /&gt;&lt;BR /&gt;Can I clarify a couple of things with your dataset?&lt;BR /&gt;Do you have a related table scenario?&lt;BR /&gt;Related by a GlobalID and the GUID you are trying to update?&lt;BR /&gt;Or a single feature class with a globalID and another column in that which is a GUID?&lt;BR /&gt;&lt;BR /&gt;I also assume that the data is in an AXF.&lt;BR /&gt;&lt;BR /&gt;How about trying updating the rows through the Datasource object, then you can pass SQL queries through. This works well for me.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Gareth&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply Gareth.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To clarify:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Data is checked out to an AXF from SDE or FileGDB's.&amp;nbsp; Issues exist using either Database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Checking out GlobalID fields is apparently not supported with arcpad: "CQ00312796:ArcPad Checkout geoprocessing tool fails for features with relationship class based on a GUID".&amp;nbsp; ESRI support has not expanded the scope of that bug to include my particular case, however they have replicated it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 3 feature classes.&amp;nbsp; One feature class has related tables, however I am NOT trying to update the related fields via scripting.&amp;nbsp; There are no relations between feature classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Users will only be collecting point type features (ControlPoints) and I am populated the other features (polylines) via scripting without geometry.&amp;nbsp; Point feature will have a single column not involved in a relationship that will also be updated via scripting.&amp;nbsp; Not the best to have application logic trying to maintain referential integrity, but you have to use messy hacks like this with ESRI products...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried using DataSource object as well, but have issues managing the bookmark cursor across the multiple feature classes.&amp;nbsp; Got an example of how you're doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, ESRI has replicated my issues and has replied that "this sort of functionality is not supported".&amp;nbsp; Whats most annoying is: it sort of is supported, I can get the values to changes, however it throws the error, which I believe to be an issue with type casting in the way arcpad tries to access the GUID field type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Plugging along using text fields, not as elegant, but functional.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 17:47:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40263#M286</guid>
      <dc:creator>RobertMcCann</dc:creator>
      <dc:date>2011-09-15T17:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPad and GUID fields</title>
      <link>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40264#M287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue with that CQ will be supported in the new release of 10.0.3. In fact there should be a build going up on the ArcPad Beta site this week that you can try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest that you have unique DataSource, counters, recordsets and bookmark variables per layer. This way you can keep track of them indivually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sign up for the beta if you haven't already and if possible can you upload your project or atleast some of the code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gareth&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2011 21:48:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/arcpad-and-guid-fields/m-p/40264#M287</guid>
      <dc:creator>GarethWalters</dc:creator>
      <dc:date>2011-10-02T21:48:16Z</dc:date>
    </item>
  </channel>
</rss>

