POST
|
I have a workflow that involves managing content and users between our organizational account and our Hub account. This process involves hundreds of groups that will require a half-dozen users each. An important piece of the puzzle is a script that invites my Hub account into all of the several hundred groups (as a manager) so that, from that Hub account, another script can run that creates the users and adds them to their respective groups. Finding my relevant groups and inviting my Hub account is no problem. However, I would like to be able to accept all of those invitations within the script, so I don't have to click 'accept' five hundred times. According to the documentation, the gis.sharing module, and calling the UserInvitationManager, should do the trick. However, I keep getting property map errors when I attempt to access invitations. from arcgis.gis import sharing as GIShare
user = gis.properties.user
GIShare.UserInvitationManager(user=user) Looking for some guidance on how to use this....apologies if I'm overlooking something obvious as I'm a bit of a novice. There's not a lot of documentation.
... View more
12-06-2023
04:57 PM
|
0
|
1
|
311
|
POST
|
Solved here: https://community.esri.com/t5/arcgis-api-for-python-questions/cannot-enable-any-organization-s-members-setting/td-p/1299559
... View more
11-29-2023
03:50 PM
|
0
|
0
|
257
|
POST
|
I have a script that ingests a csv of jurisdictions and creates groups/apps based on that list. I am running into an issue with one of the parameters of the groups.create() method: the memebership_access parameter isn't honored. The documentation says it will take will take 'org', 'collaboration', and 'none' as optional strings (and the documentation is itself confused, because in the example script it uses None, which is quite different). The docs says 'none' is the default, but it isn't. If no argument is given it defaults to org. Calling 'collaboration' works. However, calling 'none' (or None, as I've tried both) does not work. A code snippet: j = 'Riverside5'
print('\nCreating group for '+ j + '...')
newGroup = gis.groups.create(title = 'FHSZ LRA - ' + j, tags = tagsList, snippet = groupSnippetText, access = 'private', display_settings = 'apps', is_invitation_only = 'True', sort_order = 'desc', thumbnail = groupThumbnailURL, membership_access='none')
print('Group created. Group ID: '+ newGroup.id) The result stays here: The intention of the script is to assist in the creation of hundreds of groups. Not being able to specify this setting is a considerable problem.
... View more
11-29-2023
03:06 PM
|
0
|
1
|
318
|
POST
|
Thanks, @EarlMedina . Those are perfectly good workarounds and I'll use them instead. I have a follow-up question, just out of curiosity around Esri as an organization. You work for them. You've observed the problem and acknowledge it as an issue. Why, then, is there not a more direct line to getting it fixed internally, seeing as you're part of the team? It doesn't make sense that I should now work with my administrator to open a case, wait to get a call back, maybe get assigned a competent tech, just to log a bug that sits around and is never resolved. You're asking a customer who pays for this service to spend their time helping fix the thing that, based on the company's documentation, should already work.
... View more
11-20-2023
09:51 AM
|
0
|
1
|
320
|
POST
|
I am having trouble pulling specific set of properties from various items via the api. I have a script that ingests a lists of jurisdictions and then creates a group, view layer, web map, and application (based on templates) for each jurisdiction. As part of the process I am also including an output table of all created items with their ids, url's, ownerFolder, title, etc. All properties can be pulled successfully with the exception of 'groupDesignations' and the 'url' for web maps. Group Designations It appears that however Esri has intended this to function the groups that an item is shared with is not recorded in the item's properties. See the item's JSON via the assistant below, where there are no values for groupDesignations (even though this is in fact shared). And below, where there is a workaround to call it via .shared_with(), but it requires pulling it out of a list. Web Map URL How else can one pull the web map's URL? item.url pulls nothing. And scanning the item's JSON it doesn't appear that the URL that it lives at is stored anywhere. What other methods are there to capture and store the map's url in a table? (Calling .url for the other item types works just fine).
... View more
11-17-2023
02:16 PM
|
1
|
4
|
421
|
IDEA
|
@JeffreyThompson2 well heck I appreciate your effort, and for coming back and trying to fill me/us in. I'm going to go back to shaking my fist at Esri's lack of foresight.
... View more
10-31-2023
09:43 AM
|
0
|
0
|
654
|
POST
|
Did you ever find an answer for this? I was searching for the same thing and came across your post....it just doesn't have much in it.
... View more
10-23-2023
02:33 PM
|
0
|
0
|
275
|
POST
|
@jcarlson Would you have any suggestions on how to adapt this to compare what would effectively be the null part of the geometry for the non-intersecting part of feature to the intersecting part? I'm attempting this same operation on a dataset that is not wall-to-wall. The logic to handle non-intersection works fine and returns the desired value. The problem is even if a tiny part of the feature intersects a zone it brings back the value for that zone. What I would like is, if the area of non-intersection is greater than the area intersected, return the 'null' value for non-intersection. My attempt is below, where I was thinking to define it as 'if there is no intersection or if the intersected area constitutes less than half of the total area of the feature': var overlap_amount = 0
var cdfPortal = Portal("*")
var fsFHSZ = FeatureSetByPortalItem(cdfPortal, "*", 0, ['FHSZ'])
var fsFHSZIntersect = Intersects(fsFHSZ, $feature)
var areaFeature = Area($feature)
var areaFHSZIntersect = Area(fsFHSZIntersect)
if (IsEmpty(fsFHSZIntersect) || areaFHSZIntersect < areaFeature/2) {
return 0
} else {
for(var z in fsFHSZIntersect) {
var zone = Intersection($feature, z)
var zoneOverlap = Area(zone)
if (zoneOverlap > overlap_amount) {
overlap_amount = zoneOverlap
var largest_overlap = z["FHSZ"]
return largest_overlap
}
}
} A direct adaptation of your code has the same problem, as does the function/dictionary technique that I've attempted in a few variations: var cdfPortal = Portal("*")
var fsFHSZ = FeatureSetByPortalItem(cdfPortal, "*", 0, ['FHSZ'])
var fsFHSZIntersect = Intersects(fsFHSZ, $feature)
var intersected_zones = []
for(var z in fsFHSZIntersect) {
var zone = {
Zone: z.FHSZ,
Overlap: Area(Intersection(z, $feature))
}
Push(intersected_zones, zone)
}
function sort_by_overlap(z1, z2) { return z1.Overlap < z2.Overlap }
var zone = First(Sort(intersected_zones, sort_by_overlap))
return zone.Zone
if (Zone == null) {
return 0
} else {
return zone.Zone
} In the below image the result should be 0, but instead it brings up 'Moderate' (the area in yellow which it intersects slightly).
... View more
10-20-2023
02:15 PM
|
0
|
0
|
522
|
POST
|
@NickSchroeder I had the exact same problem with the exact same operation throwing errors in the exact same place of the exact same helper script. The slight differenced: mine was in a loop that ingested a list of jurisdictions and then creates a view for that jurisdiction. Mine worked fine in testing, and then one day it started failing but always the third time through the loop. It would create the first two just fine, run the rest of the script, and would fail at the top of iteration three. I did not find a solution; the only thing I did was change up my test list of jurisdictions in the csv that gets ingested and then suddenly it ran through them. I'll look forward to this thread staying perfectly quiet and neither of us ever getting an explanation.
... View more
10-20-2023
12:18 PM
|
0
|
0
|
618
|
POST
|
What a bummer. I found this thread because when I published a layer grouped like this in Pro.. I end up with this in AGOL.... And these are all coded value domains, wo when used in attempts at combination in AGOL it only reads them as the integer fields they are and reverts to arithmetic forms of aggregation.
... View more
10-19-2023
02:10 PM
|
1
|
0
|
548
|
IDEA
|
@JeffreyThompson2 That's actually a great idea and I hadn't considered it. Thank you for sharing.
... View more
10-19-2023
09:25 AM
|
0
|
0
|
747
|
IDEA
|
@JeffreyThompson2 You're right, it's possible. But it's 'possible' in the sense that it's a workaround, and far from ideal. The user experience of filtering via a list is inferior to the filter functionality that you have in dashboards. If that experience exists in dashboards, why can't it exist in experience builder?
... View more
10-19-2023
08:41 AM
|
0
|
0
|
751
|
POST
|
Disregard! I found my issue - when I add the queried layer to the newly replicated maps I had a spelling error so the calculation didn't recognize it when called to the map.
... View more
10-13-2023
07:37 AM
|
0
|
0
|
188
|
POST
|
I am fairly new to python and need recommendations on how to handle internal/helper function failures. I have a script that that imports a list of jurisdictions, then iterates through that list and creates a view, map, and experience builder application tailored to that jurisdiction. It's working more or less flawlessly but is routinely failing on the third iteration. And the failure happens due to an error with the arcgis\features\managers.py helper. KeyError Traceback (most recent call last)
c:\Users\user\path_to_project\script.py in <cell line: 40>()
224 for j in jList: #changed 'jurisdiction' to 'j'
225 #*Create Views
---> 226 jView = masterLayer.manager.create_view(name = j + '_view', spatial_reference = sr, tags = tagsText, capabilities = "Create,Query,Update,Delete,Editing,ChangeTracking")
227 jView.move(folder = folder)
228 jViewFLC = arcgis.features.FeatureLayerCollection.fromitem(jView)
c:\Users\user\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\lib\site-packages\arcgis\features\managers.py in create_view(self, name, spatial_reference, extent, allow_schema_changes, updateable, capabilities, view_layers, view_tables, description, tags, snippet, overwrite, set_item_id, preserve_layer_ids)
2006 params["description"] = description
2007 res = gis._con.post(path=url, postdata=params)
-> 2008 view = content.get(res["itemId"])
2009 fs_view = FeatureLayerCollection(url=view.url, gis=gis)
2010 add_def = {"layers": [], "tables": []}
KeyError: 'itemId' The loop runs all the way through the first two items in the list and then fails on the third. It was running all the way through two days ago and nothing has much changed (I made some tweaks to other areas of the script, but don't think it would affect it). How do I isolate the error?
... View more
10-12-2023
09:29 AM
|
0
|
1
|
238
|
POST
|
@jcarlson I find this answer a little flat. You say "the edit widget there is meant for editing existing features and for creating singlepart geometries" as if wanting to create multipart features is somehow out of scope and presumptuous. I ask 'why' facetiously. Of course that's a question for the developers. And I constantly wonder with Esri's products why relatively common operations, like creating multi-part features, isn't thought of when they roll things out. 'Hard to pull off' isn't really a good excuse, seeing as there's absolutely no limitation on multi part features in a feature service itself, just the widget that allows for it.
... View more
10-11-2023
09:39 AM
|
0
|
1
|
313
|
Title | Kudos | Posted |
---|---|---|
1 | 10-11-2023 09:07 AM | |
1 | 05-03-2023 10:23 AM | |
1 | 12-12-2023 11:48 AM | |
1 | 12-07-2023 04:38 PM | |
1 | 11-17-2023 02:16 PM |
Online Status |
Offline
|
Date Last Visited |
a month ago
|