|
POST
|
Assuming all fields are TEXT, this might work (note the space between the double quotes in line 2): def processInput(input1, input2, input3):
return " ".join([str(i).strip() for i in [ !input1!, !input2!, !input3!] if i]).strip()
# you can also tack on .replace(" "," ") after the last .strip() to remove double spaces if needed
... View more
02-24-2016
12:42 PM
|
2
|
3
|
578
|
|
POST
|
You may need to add a check for null values before joining. Nulls may also affect the strip function. I think Dan suggested using something like this in a different thread on joining nulls: " ".join([str(i) for i in [ !input1!, !input2!, !input3!] if i])
... View more
02-24-2016
12:23 PM
|
1
|
5
|
1349
|
|
POST
|
Also, does Geoprocessing >> Results >> Current Session provide any error messages after trying the code?
... View more
02-24-2016
11:33 AM
|
0
|
7
|
1349
|
|
POST
|
I did "provide feedback" prior to posting this. My previous test used 10.2.1. Thanks.
... View more
02-20-2016
09:59 AM
|
1
|
0
|
1179
|
|
POST
|
I was experimenting with the following code provided on the Prj File properties documentation page using Desktop 10.3.1 and received an attribute error message. With version 10.2 the code ran without error. import arcpy
# Create a Describe Object from a prj file.
#
desc = arcpy.Describe("C:\data\mexico.prj")
# Print some properties of the SpatialReference class object.
#
SR = desc.spatialReference
print "Name: " + SR.name
print "Type: " + SR.type
print "isHighPrecision: " + str(SR.isHighPrecision)
print "scaleFactor: " + str(SR.scaleFactor) It appears that with version 10.3, you should reference the shape file (shp) and not the projection (prj) file for Describe to work properly.
... View more
02-20-2016
09:06 AM
|
1
|
2
|
2825
|
|
POST
|
Getting off topic a little... Rebecca, you could write a function. For DD to DMS, something like: def dd2dms(dd,xy):
is_positive = dd >= 0
dd = abs(dd)
m,s = divmod(dd*3600,60)
d,m = divmod(m,60)
if is_positive:
if xy == 'lat' : nsew = ' N'
else : nsew = ' E'
else:
if xy == 'lat' : nsew = ' S'
else : nsew = ' W'
return str(int(d))+' '+str(int(m))+' '+str(round(s,1))+ nsew
print 61.217176, -149.889006
print dd2dms(61.217176,'lat'), dd2dms(-149.889006,'lon')
# 61 13 1.8 N 149 53 20.4 W
... View more
02-18-2016
09:58 PM
|
0
|
0
|
2078
|
|
POST
|
If you know the reference numbers, you can use this instead: # WGS 1984 : (4326) Lat/Lon
# WGS 1984 Web Mercator (auxiliary sphere) : (102100) or (3857)
ptGeometry = arcpy.PointGeometry(arcpy.Point(x,y),arcpy.SpatialReference(4326)).projectAs(arcpy.SpatialReference(3857))
... View more
02-18-2016
05:04 PM
|
0
|
0
|
2078
|
|
POST
|
Does something like this help: import arcpy
# WGS 1984 : (4326) Lat/Lon
x = -89.384171
y = 43.074743
# xy = Wisconsin Capitol
sr = arcpy.SpatialReference(r'C:\path2file\custom.prj') # your projection file
ptGeometry = arcpy.PointGeometry(arcpy.Point(x,y),arcpy.SpatialReference(4326)).projectAs(sr)
print ptGeometry.JSON
print x, y
print ptGeometry.firstPoint.X, ptGeometry.firstPoint.Y
# converted xy = 2538768.50758 1604492.87376
... View more
02-18-2016
03:26 PM
|
1
|
7
|
5702
|
|
POST
|
For debugging, I would suggest first to make a copy of your map. Then delete one layer at a time to identify any bad layers. When the map starts working, then you can try adding back any layers that were deleted just to verify any problems with the layer. Alternatively, start with a new map and add layers one at a time, verify the map works, then add the next.
... View more
02-17-2016
03:51 PM
|
1
|
0
|
1736
|
|
POST
|
From the error message, I suggest checking the properties of your feature layers. They should be editable at the layer level - editors can edit, add, etc. In your map, you can configure the pop-up to disable or limit editing of a layer. There is also an option in your map to disable editing on a layer. Collector maps should have at least one editable layer.
... View more
02-16-2016
02:05 PM
|
0
|
2
|
1736
|
|
POST
|
See this blog post: Using Python to push updates to a hosted feature service from an external source.
... View more
02-09-2016
09:45 AM
|
2
|
1
|
4529
|
|
POST
|
Is it an issue of converting between UTC and local time? Try converting local time to UTC before calling the routing service, then convert the routing response back to local time.
... View more
02-08-2016
02:48 PM
|
2
|
1
|
1205
|
|
POST
|
As a work around, you can configure the pop-up in your map to display the data in the field you are using for symbology as part of the pop-up title. This field can be made read-only (check display and uncheck edit) if you do not want your collectors to edit this field. If the data is a coded value, consider using a domain to give it a meaningful description.
... View more
01-14-2016
12:54 PM
|
0
|
0
|
1169
|
|
POST
|
I have used the REST API via python to obtain the last edit date for a feature. See thread https://community.esri.com/thread/161245 for info. You would set up a python script to query your feature for any new updates since the script was last run, sleep for a specified period and requery. If the script finds something, it would send an email.
... View more
01-07-2016
02:25 PM
|
2
|
1
|
3893
|
|
POST
|
I did a little more experimenting. I was only able to get symbology to work with a coded value domain as described in my previous post and have it work in a manner you are needing. It did not seem possible to use a range domain with a field being used for symbology. This may be a limitation of AGOL/Collector. Perhaps ESRI could answer this.
... View more
12-23-2015
10:22 PM
|
0
|
0
|
941
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-27-2016 02:23 PM | |
| 1 | 09-09-2017 08:27 PM | |
| 2 | 08-20-2020 06:15 PM | |
| 1 | 10-21-2021 09:15 PM | |
| 1 | 07-19-2018 12:33 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-15-2025
02:54 PM
|