|
POST
|
I still have something wrong, but I don't know how to print error messages because arcpy.GetMessages() doesn't return anything. Is there another way to get the error messages from failed functions? Here's the portion of code that is failing: field_mapping = {'ObservationDate':'ReportObservationDate',
'CampsiteDescription':'ReportCampsiteDescription',
'FollowUpRequest':'ReportFollowUpRequest',
'SubmitterName':'ReportSubmitterName',
'PreferredContact':'ReportSubmitterPreferredContact',
'EmailAddress':'ReportSubmitterEmailAddress',
'PhoneNumber':'ReportSubmitterPhoneNumber',
'submission_date_and_time':'ReportDate'
}
sdf = feature_layer.query(where=query).sdf
feature_layer.edit_features(adds = sdf.to_featureset(), field_mapping=field_mapping) I think line 10 is working because I added a print statement for the sdf variable and got this (confidential information blurred in the screenshot):
... View more
11-19-2024
02:26 PM
|
0
|
0
|
1776
|
|
IDEA
|
In Portal 11.3, we have a web map that is shared with four groups that limit access to people who are trained in editing. We added two web layers to this map that are shared with Organization. When we tried to save the web map, we were prevented from doing so because the layers were not explicitly shared with the same groups as the web map. My suggestion is that Portal should consider items shared with an entire organization as equivalent to being shared with groups. For clarity, we do not want to share these layers with Everyone (e.g. make them public).
... View more
11-19-2024
07:05 AM
|
3
|
1
|
396
|
|
POST
|
I don't have any attachments, @Clubdebambos. Is there a way to do field mapping with the edit_features function? Some of the field names in the input feature layer don't match the target layer.
... View more
11-13-2024
07:25 AM
|
0
|
2
|
1835
|
|
POST
|
I'm new to using the ArcGIS API for Python in an ArcGIS Online Notebook and am looking for help to identify the right function(s) for a data maintenance script I'm migrating from a scheduled task on a server. The start of the script works fine: I select a small number of records from a hosted feature layer. (If it matters, the hosted feature layer is part of a Survey123 survey). I'm struggling with finding the function(s) to: 1. Append those selected records to another hosted feature layer, and 2. On those newly appended records, update the value in the status field to 'Not Reviewed'. The status field does not exist in the source layer, but it does in the target layer. These two steps don't have to be in this order. I'm fine with exporting the records, adding a status field, calculating that 'Not Reviewed' value and then appending the updated records to my target layer. Appreciate any hints that the community can offer!
... View more
11-12-2024
08:39 AM
|
0
|
13
|
2470
|
|
IDEA
|
To add to this excellent idea, the workaround that GT_UTCO offers does not work for users who use IWA to authenticate. I cannot use the SignInToPortal function to force a switch of portals because storing the username and password in the script does not work for IWA (using Active Directory credentials to log in). At this point, my only workaround is to use a Notebook for my all-ArcGIS Online script and leave my portal default on our Enterprise Portal for our other scripts. This breaks our organization's governance guidelines because we don't allow individuals to own maintenance scripts so that scripts stop working when a person leaves the company.
... View more
11-05-2024
06:41 AM
|
0
|
0
|
961
|
|
POST
|
@RhettZufelt - regarding "I have a scheduled task that opens/closes Pro every monday night just to keep my sign in active." Can you provide details on this? I've been digging through the arcpy documentation without luck to find a function that will do this because I'm having issues with my account logging out of its connection to our Portal, presumably due to inactivity.
... View more
11-04-2024
10:25 AM
|
0
|
1
|
2769
|
|
POST
|
You hit the nail on the head. I forgot that I changed my default portal to our Enterprise Portal to support some new scripts that I took ownership of from a departing employee. I'll need to find a way to change portals in my scripts to address that issue. Thank you!
... View more
10-31-2024
06:27 AM
|
0
|
0
|
741
|
|
POST
|
I have a line at the beginning of a script that reads as follows: item = gis.content.get("03e43ce195534e028e7bf49e951414c8") I know that the item ID is valid for a hosted feature layer in my ArcGIS Online organization and that the log-in that I'm using to run the script has permission to access it. (It is not shared publicly, so even if you search for it on your own, you won't be able to view it.) If I add the following statement to the script... print(item) ... the print statement returns "None". Based on this post, a return of "None" means that the feature layer has a size of zero bytes. This isn't possible, as the layer has 502 records. The subsequent steps involve reading through a specific field to look for the most recent date, but the script doesn't get to that point because the get.content.get step isn't returning data. Any ideas for troubleshooting?
... View more
10-30-2024
07:37 AM
|
0
|
2
|
779
|
|
POST
|
Here's another issue that I ran into today. I have a user named gis_viewer in our SQL database that I was using to connect to the enterprise database with my data. I can publish services to Portal with that database connection, but it's missing a permission that will prevent the data from copying via the collaboration. I don't know what the permission is, but I think it requires more than SELECT. Maybe someone from Esri like @ReeseFacendini can provide the link to that resource?
... View more
08-20-2024
01:12 PM
|
0
|
0
|
4720
|
|
POST
|
There is a bug in Enterprise 11.1 for multi-machine deployments that is fixed in 11.3: 113-IssuesAddressedList_06112024.pdf (esri.com) In addition to edit sync failures, I was getting a lot of those generic "failed to export item" errors while still on Enterprise 11.1. Upgrading to 11.3 resolved my issue. One other thing to check: make sure that you aren't hiding any fields in your attribute table. In particular, the sync needs all of the editor tracking fields as well as global ID. I got that generic error many times when I had hidden those fields from the attribute table before publishing to Portal. Good luck!
... View more
08-20-2024
10:50 AM
|
3
|
2
|
4744
|
|
POST
|
I don't have a solution or explanation yet, but I do have a workaround. After adding the new layer to a web map, I removed the unique symbology and the redid it from scratch. Somehow, making any change to the symbology resolves the issue. All I can guess right now is that the web map or the Instant App doesn't like something about the symbology as-is when it comes across in the collaboration. I've got a ticket in with Esri tech support, but I'm really not sure whether we'll find a root cause or not. It was a pain to manually redo the colors on 20 bus routes, but hey, if it works, it works!
... View more
08-16-2024
02:20 PM
|
0
|
0
|
889
|
|
POST
|
Also, here is the item page for the service I'm using, if you want to test on your own: https://lawrenceks.maps.arcgis.com/home/item.html?id=814063f5548042c19ca8fc6b469efa2b
... View more
08-16-2024
09:34 AM
|
0
|
0
|
898
|
|
POST
|
@BethRomero - sorry, I turned off sharing on that app. It's back to Public now. Appreciate your time!
... View more
08-16-2024
09:33 AM
|
0
|
0
|
899
|
|
POST
|
I'm sure I am missing something obvious. My current app is here: https://lawrenceks.maps.arcgis.com/apps/instant/interactivelegend/index.html?appid=69fec06502a6487e9a40583766ce5ec9 It works fine. All of the bus routes display initially, and clicking in the legend filters them. I created the exact same app, but added in the new routes. It is here: https://lawrenceks.maps.arcgis.com/apps/instant/interactivelegend/index.html?appid=a5a1a3bd56844844a9966aa7a38b32d7 When you click the legend, the first layer you pick will disappear from the map, but nothing else works. Also, I noticed that in the working app, there is a button to Select All. That does not appear when I use the new data. Differences that I've tested: - Both layers are hosted feature services, but the new one is a copy coming from a distributed collaboration with our Portal. I tried publishing the layer directly to ArcGIS Online as a hosted layer and it made no difference. - The new layer has a definition query on it. I removed it and republished the service, but found no change. - The new layer has punctuation in the name. I removed those and republished to no effect. - The new layer was originally symbolized on a text field, so I converted it to a number field and republished. Again, no change. I'm always a little suspicious of linework that starts and ends in the same spot because we know lines don't want to self intersect, but both the old and new datasets have that situation. I also ran check geometry on the new layer to see if there were any issues. I haven't done a full topology check, but I suppose that's my next step. Open to other ideas!
... View more
08-15-2024
04:23 PM
|
0
|
4
|
940
|
|
IDEA
|
I have a Pro project that I use exclusively to digitize zoning ordinances. Many times, the legal description references a plat, so I use the Locate tool > Layer Search to find the plat by name. Every time I open that project, I have to open the Locate tool, switch to Layer Search, and change the settings to Search in layer > Plat and change Match exact to Match any part. It would be nice if there were a way to save those settings to that project so that I didn't have to redo it every time.
... View more
08-13-2024
09:01 AM
|
1
|
1
|
959
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Friday | |
| 2 | a month ago | |
| 1 | 05-12-2025 06:28 AM | |
| 1 | 12-04-2025 07:20 PM | |
| 1 | 06-26-2025 12:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|