Collector Issues: Related Tables, Attachments and Opening with ArcMap

18321
40
Jump to solution
02-24-2015 01:29 PM
MasonBailie
New Contributor III

Thank you ESRI, this latest update has been excellent! My organization had actually been developing our own mobile app so that we could easily collect data (requiring relationships) in the field; when it was announced in 10.3, that these capabilities were being added to collector, we were very excited! That being said, I'm having a couple of issues--- I'm not sure if they are features that haven't been developed yet or if I'm doing something incorrect.

Refer to this map, it is just a test map so you can feel free to add your own features to test out the functionality:

http://grmw.maps.arcgis.com/home/item.html?id=050e93147b0c4df18644c45b7fca0ac5

My three tables look like this:

Restoration Projects:

     - Object ID

     - Project ID

     - Polygon Field

     - Name and a few more text fields that aren't important

Project Features:

     - Object ID

     - ProjectKey (related to Restoration Projects 'Project ID' Field)

     - Point Field

     - Date and other fields

     - Attachment

Monitoring Records:

     - Object ID

     - FeatureKey (related to Project Features 'Object ID' Field)

     - Date/comment and other fields

     - Attachment

Projects 1:M--> Project Features 1:M--> Monitoring Records

I can create ‘Projects’ in the app just fine. Displaying how many ‘Features’ a Project has in the popup works in the ArcGIS Online viewer but not Collector. In Collector, it leaves Feature Count blank.

Problem #1 - Collector seems to not show related table information correctly in popups

Creating a Feature works just as I'd hoped. You click on the Project area, go to "New" at the bottom of the pop up form and create a feature for that project. Collector smartly adds the correct ProjectKey information into that Feature so that my users do not have to know the Project ID or type it in continuously when they are creating Project Features. Everything works great here. I click view and can see my Project Feature has been added nicely and displays correctly. The problem lies in the next step, the nested related table, adding a “Monitoring Record” for that Feature. I click "New" at the bottom of the Feature, and immediately I notice that the FeatureKey is not filled in. This is a bummer since it worked so well for the Project Feature previously.

Problem #2 - My Monitoring Records do not automatically add the FeatureKey to the field

I do not want my co-workers to have to remember the FeatureKey that they are creating a Monitoring Record for (likely, they won't be able to). Oddly enough, if I leave that field blank while filling out the Monitoring Records form, the Monitoring Record is still related to the Project Feature. I'm not sure how, since that field appeared to be blank.

So I change my use back to the ArcGIS Online viewer: Project Data is correct, Feature data is correct and attachments are working, here’s the kicker--- and I cannot view the Monitoring Records attachment. (That seems to be the only problem with the Online viewer. Other than this, I'm very happy with how well that works.)

Problem #3 - I can't see attachments for my table

Next it's time to open the data in ArcMap. Online, I browse to My Content, click on my Feature Layer and select Open in ArcGIS for Desktop. It downloads a file that I click and opens up ArcMap (this is a very nice way to do this, simple and easy to use). I see my Project and Feature data. I click the Project I created and it shows the Feature relationship it has. That Feature has an attachment as well that loads via my Windows Photo Viewer. (Great!) And then I notice that my Feature does not have any Monitoring Records associated with it. I then click the "List By Source" and notice that my Monitoring Records table doesn't seem to be included with the Service.

Problem #4 - ArcGIS Online doesn't seem to attach my related table to the service given to ArcMap

Those are the issues I'm having. Sorry that was long winded, I wanted to explain my scenario thoroughly. I'm nervous writing all this as I'll probably get a response of "you did your relationship wrong," or something simple like that. But I hope I gave you guys enough information to see my problems.

Thanks again for the 10.3 release, it has some very exciting uses! If I need to attach any files for people to test out, let me know.

1 Solution

Accepted Solutions
RussRoberts
Esri Notable Contributor

When you bring the data in ArcMap can you try from the Feature Service's item detail page can you try to export the data into fgdb and that should carry over your relationships.

Russ

View solution in original post

40 Replies
RussRoberts
Esri Notable Contributor

Hey Mason,

1) This is great feedback! Thanks for writing this up!

I wrote back some responses for the issues that you are seeing. Let me know if this helps you out or if I missed anything.

-ObjectID relationships are not supported. We support GlobalID relationships and non-OID field relationships. So if you change the relationship to Project Features GlobalID to Monitoring Records GUID field the relationship will work.

-If you are using Non-GlobalID based relationships I think hiding this field or make it non-editable in the popup and this can reduce the chance of the related record being orphaned. Currently in AGOL with viewing AGOL table results you cannot show attachments right now.

-This one sounds like you are losing the relationship when you are bringing it into ArcMap. Have you brought the feature service into ArcMap and tried Create Local Copy for Editing? Does this bring in the table.

Russ

MasonBailie
New Contributor III

Russell Roberts‌ thank you for your quick response. Switching from using the OID to the GUID has solved the problems with Collector. Thanks!

I still cannot get the Monitoring Records to work in ArcMap. When I try to save a local copy of the service I get this error:

arcgis.JPG

The FeatureKey is part of the MonitoringRecords table. It is of datatype GUID now, since it points to the Project Feature's Global ID. I'll be trying to figure out what is wrong with that column. I did notice that I cannot see the column 'FeatureKey' in ArcGIS Online's Table view. I believe that is because it hides all GUID information, but in doing that I cannot check to see if the correct data is being inserted into it.

Here is the current map/data I'm now working on.

http://arcg.is/1FtnqAG

Thanks!

0 Kudos
RussRoberts
Esri Notable Contributor

When you bring the data in ArcMap can you try from the Feature Service's item detail page can you try to export the data into fgdb and that should carry over your relationships.

Russ

MasonBailie
New Contributor III

Thanks Russell, that worked perfectly!

0 Kudos
NilsBabel
Occasional Contributor II

How exactly did you get this to work in ArcMap?  I think russell roberts​ instruction was to export the service to a fgdb.  But that doesn't maintain the link to the feature service.  I have a relationship setup with GlobalID and GUID, the same as you have described above.  When I try and create a local copy for editing I get the same error as you 'A general error when something is wrong with a Field.'  The error is on the GUID field.  Did you fix this somehow?  It seems that local edits in ArcMap with a related table is not supported.  Am I wrong? Collector for ArcGIS

0 Kudos
AnthonyRyan2
New Contributor

How do you change the GlobalID to a GUID. I have found a site that gave me C# & VB code to do this. However, I have never worked with code. Do you mind telling me, or send me links to show me how to accomplish this? Thanks.

0 Kudos
RussRoberts
Esri Notable Contributor

Here are the steps to do it

1) create your parent feature class and your child feature class & table

2) add globalids to them through the right click > Manage >Add Globalid ID in Desktop

3) on the child feature class/table in the gdb create a field and assign it the type GUID instead of the default text

4) create the relationship class and point the parent GlobalID to the child GUID field.

5)Publish to your server or AGOL account.

VickyS
by
Occasional Contributor

Hi Russel

I think this is a bug with the android app. It works online but does not let you download it. I think it is a bug as it works perfectly in the new iOS app (on & offline).

FC - FC to Table

Thank you

Vicky

0 Kudos
RussRoberts
Esri Notable Contributor

Can you share your map with Collector4ArcGIS and I can look into why it is not downloading on Android.

Russ