|
POST
|
Hi Clive, I'll admit I'm a little confused about your code, as I don't see any reference to FeatureName[0] and your variable "groups" seems to be returning your feature layers? Also your output doesn't match what's in your "rowitem" at all? Regardless, to access that information you need to access the FeatureLayer object properties, which gives you access to the name and id as a dictionary. # this prints the dictionary with all of the extra info, flayer being a Feature Layer object
flayer.properties
# to print id and name respectively
flayer.properties["id"]
flayer.properties["name"] If your intention is to iterate over every feature layer and print out that information, I think the following code does it a bit more efficiently. serviceItems = gis.content.search("*", item_type="Feature*", max_items=1000)
for item in serviceItems:
layers = item.layers
for lyr in layers:
try:
print(item.id, item.url, lyr.properties["id"], lyr.properties["name"])
except Exception as e:
print(e)
... View more
12-18-2020
08:08 AM
|
2
|
2
|
2350
|
|
POST
|
Ahh, I should have looked at the documentation again. Replace the & with a ? and you should be fine. "The Survey123 web app can accept parameters in the same format as the field app. The only difference is that you must use a question mark to separate the item ID of the survey from the first parameter, rather than an ampersand (ampersands are still used to separate parameters). The following example URL passes the surname and coordinate parameters to a survey in the Survey123 web app: https://survey123.arcgis.com/share/36ff9e8c13e042a58cfce4ad87f55d19?field:surname=Klauser¢er=37.8199,-122.4783"
... View more
12-18-2020
06:06 AM
|
0
|
2
|
3402
|
|
POST
|
Hi, I notice when hovering over those urls that it's still directing to &field:Species with a capital, I'm not sure if that is what is happening in reality or just what you've typed to me but it's worth checking. It seems you may have updated the display text but not the underlying link url. Otherwise the formatting of the url looks fine to me, it seems like everything is working properly except for the matching of the fields, or else the survey wouldn't be opening or "Alder" wouldn't be getting populated. I don't think consuming the survey feature layer in the web map would be causing this behaviour. To avoid these potential issues you can try getting the field populating working outside of the web map, i.e. just clicking https://survey123.arcgis.com/share/8f45592bb9084c8592c90640f3a1c78c&field:species=Alder
... View more
12-18-2020
04:18 AM
|
0
|
1
|
3415
|
|
POST
|
Hi, Have you checked the Survey123 form schema to confirm the name of the field? This is often different to the question title; it might be that the actual field name is "species", which would explain why it isn't populating.
... View more
12-18-2020
02:54 AM
|
0
|
7
|
3420
|
|
POST
|
Hi Tanner, I wrote a script to do this last year: gis-administration/search_webmaps_for_services.py at master · joshsharpheward/gis-administration · GitHub which I designed to be run from ArcGIS Pro, you can download the gp toolbox in that repo to use it straight away! Otherwise if you want to run it from another environment you can copy the code from the script and just modify the 'gis = GIS("pro")' and 'services = arcpy.GetParameter(0)' lines. Note my script also scans web applications in your portal/agol to see if the service is being used in any configured searches, but this can be stripped out easily.
... View more
10-08-2020
07:52 AM
|
3
|
2
|
12270
|
|
POST
|
Hi, Sharing the dashboard doesn't update the sharing on the webmaps and web services within the dashboard, so I would check those items to make sure they have also been made accessible to everyone! This is a common issue when sharing a web application publicly, so could be what's going on here.
... View more
09-28-2020
07:08 AM
|
0
|
0
|
938
|
|
POST
|
From having a quick peek it looks like you can use &defaultObjectId=19 in the url to get it to start with that feature!
... View more
09-24-2020
07:16 AM
|
0
|
1
|
1490
|
|
POST
|
Hi, I put this together quickly using Pro but I'm pretty sure it should run from the Python window in ArcMap too: fishnet = "" #layer name goes here
fieldname = "" #name of field storing new value (1, 2)
fields = ["SHAPE@Y"].append(fieldname)
ys = [row[0] for row in arcpy.da.SearchCursor(fishnet, "SHAPE@Y")]
ysDict = {}
uniqueys = sorted(list(set(ys)))
for y in luniqueys:
if luniqueys.index(y) % 2 == 0:
ysDict[y] = 1
else:
ysDict[y] = 2
with arcpy.da.UpdateCursor(fish, ["SHAPE@Y", "val"]) as ucur:
for row in ucur:
row[1] = valueDict[row[0]]
ucur.updateRow(row) Just enter in the name of the layer and the field name that stores the values (1 or 2) in there. Also make sure that field is an integer field. Basically this script finds all the features unique y values, lays them out in order and assigns them a 1 or 2 depending on if its index is odd or even, then adds that value back to the feature.
... View more
09-23-2020
02:20 AM
|
3
|
1
|
1420
|
|
POST
|
Hi, I think this could work by putting the two login methods in a try-except statement. Something like this: try:
# first attempt to login using notebook specific home
gis = GIS("home")
except:
# otherwise login using active portal in pro
gis = GIS("pro") I'm pretty sure running GIS("home") outside of ArcGIS Notebooks will throw up an error, allowing this switch to work.
... View more
09-14-2020
03:16 AM
|
1
|
1
|
1471
|
|
POST
|
Glad that worked out Hailey! If you're happy with the answer mark this question as solved to close it off
... View more
09-10-2020
12:53 AM
|
0
|
0
|
2810
|
|
POST
|
Hi Max, Isn't the layer you've added in this recent screenshot also from a feature dataset? I don't see exactly how this is different to the original screenshot, as it's also using Feature Class to Shapefile (Multiple). Try copying one of those feature classes up a level so it's not within a feature dataset, just within the geodatabase, and see whether the Feature Class to Shapefile (Multiple) tool works on it?
... View more
09-09-2020
01:39 AM
|
0
|
1
|
1303
|
|
POST
|
Hi Max, Might the issue be that the feature classes are within feature datasets?
... View more
09-08-2020
02:11 PM
|
1
|
0
|
1303
|
|
POST
|
Hi Hailey, Overlay tools (Union, Intersect etc.) can be run with a single input to find self-overlaps, which may very well help out with what you're trying to do! How Intersect works—ArcGIS Pro | Documentation How Union works—ArcGIS Pro | Documentation I imagine in this case you would want to use Intersect! Worth running it and seeing what the output looks like.
... View more
09-08-2020
02:07 PM
|
1
|
0
|
2810
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-22-2023 10:37 PM | |
| 1 | 04-05-2023 11:09 PM | |
| 1 | 05-21-2024 10:26 PM | |
| 1 | 04-20-2023 12:05 AM | |
| 1 | 05-21-2023 10:47 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-20-2025
08:52 AM
|