|
POST
|
Hi there, I have a question related to the new question types, and also using custom JavaScript functions in Survey123 (Survey123 Connect and Excel), in the new version of Survey123 coming out in July 2020. I attended the Survey123 sessions at the 2020 UC with Ismael Chivite and James Tedrick and attempted to ask questions, but my questions - in every session - were labeled as "waiting for review" and were apparently never viewed by anyone! I also made appointments with Survey123 team members in the Showcase but no one ever met with me. So here I am! I learned that "geopoint" questions will now be called "map" questions. In my existing surveys that have geopoint questions, will I have to go back into the Excel and change them to "map" questions in order for the survey to still work with the new version of Survey123? I learned that custom JS functions will now be required to go in a folder called "scripts." This folder used to have to be called "extensions." I have two existing surveys that use JS functions in "extensions." Will I have to rename the folder to "scripts" in order for my custom JS to continue to work properly in my surveys with the new version of Survey123? Thank you! Allen
... View more
07-16-2020
11:49 AM
|
1
|
2
|
1323
|
|
POST
|
Oh, huh! I've learned from experience that it's necessary to have the "r" in front of the path, but I didn't know what it actually meant or did, so that's a big help to know that it helps prevent unintended escapes due to backslashes! That makes sense.
... View more
06-16-2020
03:23 PM
|
0
|
0
|
2242
|
|
POST
|
Thanks for that tip! hmmm.... my script has been working fine with the single backslashes, so your post makes me wonder why I haven't had problems with that!
... View more
06-16-2020
02:23 PM
|
0
|
0
|
2242
|
|
POST
|
Thanks for your suggestions, Joe and Egge-Jan! I quit and then reopened ArcMap and tried again, and this time the code was pasted normally and it worked. I'd still be quite interested to hear if anyone has an answer to my question, just out of curiosity. But I guess the moral of the story is: if you have a problem, quit the application and then try again. --Allen
... View more
06-16-2020
02:21 PM
|
1
|
0
|
2242
|
|
POST
|
Hello there, I've been working on creating some Python scripts, and I've been testing out parts of them by copying and pasting the code from PyCharm into the Python window in ArcMap. That has worked perfectly for many days, until today. Today, when I've tried copying and pasting this script (which is for undoing some of what my real script does, so that I can re-test it), it gets pasted in an unusual font. I HAVE RUN THIS SCRIPT SUCCESSFULLY BEFORE. But today, it does not seem to be recognized as code. It does not automatically get the dots on the left-hand side of the lines of code that it normally gets. And the code does not run, as you can see in the error message at the bottom. Can anyone help me get back to the correct style pasting? Why is this happening? Thank you!
... View more
06-16-2020
11:32 AM
|
0
|
6
|
2310
|
|
POST
|
Thank you, David! Based on your suggestion, I tried removing the [] around the field name, and that didn't accomplish anything. Then I put the [] back on, and I tried adding the index to this line: row[0]=str(counter), and it worked! Now I am able to change values to be multiple characters. I thought I wouldn't need to use the [0] because I was only using one field, rather than two, but I suppose it does make sense that it's still necessary, because the field is a list in this code. The field length is 50.
... View more
06-08-2020
01:44 PM
|
0
|
0
|
4343
|
|
POST
|
Thanks for your reply, Dan! I tried that right after reading your reply, and unfortunately it did not change the results.
... View more
06-08-2020
12:55 PM
|
0
|
2
|
4343
|
|
POST
|
I'm just learning about Cursors and am trying out the UpdateCursor with fake data in a feature class in a file geodatabase. I am working towards editing values in existing rows. I have been able to successfully do this to an extent: I'm using a counter to give each row a unique value, starting at 1. The data type is text/string (because this field is for building number, so it could include a building number such as H-101 or something). When the counter hits double-digits, i.e. 10, it throws a Type Error - "sequence size must match size of the row." I read about this error on this Esri page: Error: TypeError: sequence size must match size of the row But nothing there seemed to apply to my code. Does arcpy think that a double-digit number has two pieces, so it cannot be put into one cell?? Here is my code: import arcpy
fc = "H:\ActiveShooter\ActiveShooterAutomation\ActiveShooterAutomation.gdb\Fake_AS_buildings"
# This worked only up to 9, assigning building numbers from 1 to 9. Error after 9:
# "TypeError: sequence size must match size of the row" ???
counter = 0
with arcpy.da.UpdateCursor(fc, ["BUILDING_NUMBER"]) as cursor:
for row in cursor:
counter += 1
row = str(counter)
print(row, type(row)) # For testing/diagnostic purposes
cursor.updateRow(row) Here is what happened in ArcMap. The cell values were successfully edited/entered, up through 9. Can anybody help me figure out why this error is occurring? Thank you!! Allen
... View more
06-08-2020
11:21 AM
|
0
|
7
|
4517
|
|
IDEA
|
Esri staff: Is there any news about this issue? It does feel quite unreasonable to be unable to view or add new photos to an existing survey (like when opening it from the inbox). It's so inconvenient to have to put the photos within repeats, because it makes the survey more complicated for users, the data/photos are harder to find and access in the data tables, and perhaps most importantly, the photos within repeats cannot be displayed in a convenient way in a web map or dashboard. This seems like a serious problem and is making things really difficult for my organization. Thanks for reading.
... View more
05-07-2020
10:26 AM
|
6
|
0
|
4237
|
|
POST
|
Hi Doug, The trick I mentioned in my previous post, making the repeat's appearance "minimal," did work! But of course it would be ideal if it would work without having to change the appearance. Allen
... View more
04-14-2020
02:49 PM
|
0
|
0
|
2816
|
|
POST
|
Update: I got it to work! I found the Walk function and was able to use it to reach my goal of listing the fields and their lengths. Thank you so much for your replies, David and Dan! import arcpy
import os
workspace = r'Database Connections\prvgisdb1-GIS-webadmin.sde'
feature_classes = []
walk = arcpy.da.Walk(workspace, datatype="FeatureClass")
for dirpath, dirnames, filenames in walk:
for filename in filenames:
feature_classes.append(os.path.join(dirpath, filename))
for feature_class in feature_classes:
fields = arcpy.ListFields(feature_class)
for field in fields:
if field.length > 255:
print feature_class
print("{0} {1} {2}".format(field.name, field.type, field.length)) -- Allen
... View more
03-03-2020
01:14 PM
|
1
|
0
|
4513
|
|
POST
|
Dan, Thank you for the info about formatting code! I would have never found that on my own. Yeah, the incorrect indentation of the last line turned out to be a copy/paste problem. Thanks!
... View more
03-03-2020
10:38 AM
|
0
|
0
|
4513
|
|
POST
|
EDIT: SEE MY NEWEST REPLY farther down in the discussion - I went with a different approach and got something to work!! Hi David, Thank you so much for sharing this code with me! I really appreciate it. I can see how it makes sense. I tried it out, but it did not work for me - nothing printed. I've been working on making adjustments and trying slightly different approaches, but I have not found a solution. I printed the dataset path along the way and found that the "r" was not part of it, so I was wondering if I should add the "r" back in (In previous versions of my code, I discovered that the "r" is really necessary). Below is my current version. The dataset paths are formed correctly, as far as I can tell. But feature classes within the datasets are never actually listed. There seems to be a problem with "looking inside" the datasets. Does anybody out there have any tips? import arcpy
import os
sde_path = r'Database Connections\prvgisdb1-GIS-webadmin.sde'
arcpy.env.workspace = sde_path
datasets = arcpy.ListDatasets()
dataset_path_list = []
for dataset_name in datasets:
dataset_path = os.path.join(sde_path, dataset_name)
dataset_path_list.append(dataset_path)
read_ds_path_list = []
all_fc_path_list = []
for ds_path in dataset_path_list: # For each dataset path,
read_ds_path = "r'" + ds_path + "'" # Add "r" to it
read_ds_path_list.append(read_ds_path) # Then add it to a different list
for rdp in read_ds_path_list: # For each dataset path in that list,
print rdp #test - this works
arcpy.env.workspace = rdp # Make it the workspace
fcs = arcpy.ListFeatureClasses() # List the fc's in that workspace/dataset.
print fcs # This does not work - prints "None" for each dataset.
... View more
03-03-2020
10:37 AM
|
0
|
0
|
4513
|
|
POST
|
My organization is working on figuring out Data Reviewer and deciding if we want to pursue using it in ArcMap or Pro. It is interesting that the version of Data Reviewer in ArcMap is so much more extensive, and perhaps a little more intuitive, than in Pro. Data Reviewer in ArcMap has such extensive geometry checks, for polygons and lines and points, but Pro only has feature-on-feature and cutbacks. We are in a dilemma of wanting to continue getting used to Pro and creating a Data Reviewer system that we can re-use in future years, which makes us want to use Pro, but then Pro does not have most of the checks we want, so it seems we are going to have to use ArcMap, which is kind of ironic considering the push towards Pro. Anyway, my question is, is there some way to check for geometry issues such as polyline orphans, polygon slivers, etc. in Pro? Like with topology rules or network rules? I have never used the network tools before. I have been doing a lot of Googling and research but have not been able to answer my questions yet. Note that some line feature classes we want to check for orphans are not supposed to be connected with point features at all nodes or vertices, so the edge-junction-edge network connectivity rule would not be applicable for us.
... View more
02-27-2020
01:09 PM
|
0
|
4
|
1552
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-30-2025 03:01 PM | |
| 1 | 09-30-2025 05:42 PM | |
| 1 | 11-01-2023 11:39 AM | |
| 1 | 11-21-2024 04:21 PM | |
| 1 | 08-05-2025 12:29 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-18-2025
12:06 PM
|