POST
|
Hi Rob, Very good - glad you got it sorted. I'm sure others have similar workflows - it would be great if you could share your work with the community via GitHub. This is the repository where I shared my script. Kind regards, Mikie
... View more
01-08-2018
01:03 AM
|
0
|
2
|
1722
|
DOC
|
Thanks Daniel - feel free to push any enhancements to the GitHub repository! Also, I fixed the hyperlink in my previous comment. Mikie
... View more
01-05-2018
01:50 AM
|
1
|
0
|
22091
|
DOC
|
Hi Daniel, Yes the URL is typically where you source the unique Item ID. An Item Name is not always unique so cannot be used for finding a specific item. See my comment above in relation to attribution. In short, it is not currently possible with the script in its current state, and would need some further development to get this working. It's something I'll consider as an enhancement, but unlikely to happen in the short term. Kind regards, Mikie
... View more
01-04-2018
01:01 AM
|
1
|
0
|
22091
|
DOC
|
Hi Daniel, Once the Feature Layer has been shared with you it should work. Can you access the Feature Layer by inserting the Item ID to the URL below and logging in? https://www.arcgis.com/home/item.html?id=InsertItemIdHere Is the database you are accessing hosted in ArcGIS Online, ArcGIS Enterprise (Data Store) or in an Enterprise Geodatabase? I have not tested this script with Enterprise Geodatabases. Kind regards, Mikie
... View more
01-03-2018
08:33 AM
|
1
|
0
|
22091
|
POST
|
Hi Robert, I'm not sure what the end goal is here - is it to loop through folders stored locally on disk (in a format similar to how the Download Attachments script downloads attachments) and add attachments to associated features hosted in ArcGIS Online if they don't already exist? It's hard to debug the above code by just seeing a snippet. From reading through the code, lines 48 and 49 don't appear necessary - I'm not sure what if statement the else statement relates to. What error message are you getting back? Python can also be very picky when it comes to syntax so I would suggest you keep your comments in line (e.g. lines 40 and 42). By the sounds of it, what you need to do is get a list of all attachments associated with a particular feature (you appear to be doing this in line 27). However after that you are not looping through the file names in this, only comparing with the first file name returned. Something like this may do it: if attachmentName not in attachmentsList:
#add attachment to feature It's been a while since you posted this so perhaps you made some ground in the meantime? Michael
... View more
12-29-2017
06:19 AM
|
0
|
4
|
1722
|
POST
|
Hi Mandy, Just to clarify, when you use a custom attribute display, the fields that can be viewed through the popup are configured when you click on the green configure button, highlighted in purple below: If you only have a link to Survey123 configured in this popup, that is all that will display in the popup view. Typically the custom attribute display also needs to include a view of various attributes, as in the raw HTML markup below: <b><font size="4">Feature Attribution</font></b><br /><br />
Date: {DATE_OF_VISIT}<br />
Visit Method: {VISIT_METHOD}<br />
Visit Purpose: {VISIT_PURPOSE}<br />
Activity: {ACTIVITY_TYPE}<br />
Description: {DESCRIPTION}<br /><br />
<font size="4"><a href="arcgis-survey123://?itemID=90405555825f48a394f6462a8ffaa223&field:ParentGlobalId={GlobalID}">Impact Survey</a><br /><br /></font> The fields that can be edited are set through the Configure Attributes button (highlighted in red in the first image). Whatever fields in this that have the edit box checked should appear when you click the edit button in Collector. If you are viewing the custom attribute display popup, you have to click the top right button, and click Edit to go into Edit mode. Editing must be enabled on the layer in question in order to see this option. If you have related records, these appear below the custom attribute display popup (i.e. they are not affected by using the custom attribute display). Mikie
... View more
12-29-2017
01:40 AM
|
2
|
1
|
1508
|
DOC
|
Hi Annina, I haven't tested for a dataset with that many features, and it could potentially cause problems. A quick fix might be to alter line 92. featureObjectIds = featureLayer.query(where='1=1', return_ids_only=True) This is where the original query to the feature layer is made and returns all the relevant features. When the where clause is set to 1=1, all features are returned. You could alter this to something like below to run the script for parts of the dataset: featureObjectIds = featureLayer.query(where='OBJECTID < 1000', return_ids_only=True) Given that the Feature Layer won't export, something may be corrupted internally. Judging by the error message above, the script has a problem with an attachment ID which is 'non existent' which has been return through the attachment query. If you could share the Feature Layer with me, I may be able to identify issues with the script and/or Feature Layer in question. If this is possible, my ArcGIS Online username is mikie.kelly and you could share it with me via a group without making it public. Kind regards, Mikie
... View more
12-22-2017
04:55 AM
|
2
|
0
|
22091
|
POST
|
Hi Siew, In order to update records in an existing database, you have to create a Survey123 Form on top of the database, and then enable the Inbox through Survey123 Connect. Kind regards, Mikie
... View more
12-01-2017
01:42 AM
|
3
|
6
|
3872
|
IDEA
|
Ah I get you. I'm not aware of any way to add new records to a table which is part of a 'Simple' relationship through ArcGIS Online. But as you suggested, this can be achieved through ArcGIS Pro by connecting directly to the Feature Layer from ArcGIS Online.
... View more
11-29-2017
03:59 AM
|
0
|
0
|
4900
|
IDEA
|
Hi Caroline, In your case it looks like adding new features is not enabled on the feature layer (see documentation here). In terms of how the Edit widget in Web AppBuilder works, you click on a parent record (which is typically a point/line/polygon), the widget recognises that it has associated related records, you click on them and from there you can add new records to the table as necessary. Note the table has to be in the Web Map on which the App is built. The Web Map is also where you customise how the popup appears. It is not possible to add related records outside of this (i.e. directly to the table), as this would result in orphaned records which don't link to any parent records. Michael
... View more
11-28-2017
12:51 AM
|
0
|
1
|
4900
|
POST
|
Hi John - one problem that jumps out at me is the Scientific_Name choices list. The associated names field contains spaces and full stops while it should only contain alphanumeric characters. This may be resulting in the unusual behaviour you are experiencing.
... View more
11-22-2017
12:18 PM
|
2
|
1
|
1810
|
POST
|
Hi Geethaka, You can do this by building the survey on top of a Feature Layer View which has a View Definition (Define Features) set to hide all features (e.g. WHERE OBJECTID < 1). In this Feature Layer View, you can set editing so users can only add new features. Only the Feature Layer View has to be shared with everyone, not the parent Feature Layer where all the feature can be accessed from. Mikie
... View more
11-22-2017
01:24 AM
|
1
|
4
|
2050
|
DOC
|
Very nice Robert - thanks for sharing. Definitely one to add to my bookmarks!
... View more
11-22-2017
01:08 AM
|
1
|
0
|
22091
|
POST
|
Hi Jonathan, I would suggest you clear your cache - an update was recently made to the website which may have caused this behaviour. Details on how to do this below: Chrome Internet Explorer Firefox Mikie
... View more
11-21-2017
01:28 AM
|
1
|
0
|
696
|
DOC
|
Hi Robert - not that I'm aware of. Ultimately you would have to structure the attachments so they can be linked to specific features in the dataset (like how they are downloaded through this script). There is documentation on adding attachments below, and some logic from this script could probably be used: Layer Attachments - ArcGIS API for Python arcgis.features.managers Module
... View more
11-16-2017
12:53 AM
|
1
|
0
|
22091
|
Title | Kudos | Posted |
---|---|---|
1 | 03-06-2018 07:35 AM | |
1 | 05-27-2017 02:06 PM | |
1 | 05-29-2017 07:36 AM | |
1 | 05-19-2017 08:54 AM | |
1 | 05-23-2017 12:43 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|