POST
|
Thanks a lot! I haven't really worked much with more complex calculations, so this is good information for me. I updated my expression to include the else !Field2! at the end, and it worked. I had tried finding a way to make it pass the features where the Field1 value was null, but obviously that wasn't the right solution. However, just before reading your message, I also got it to work by using the attached code block and expression (not as elegant though).
... View more
08-12-2017
01:26 PM
|
1
|
0
|
3223
|
POST
|
I'm having problems getting this code to work in Field Calculator (as part of model). To try and make the background short: I have a model where I use a series of Select by Attribute then Calculate Field to score features on the value in the first field. It is being adapted for a webmap using Server, and apparently it can't use layers (so Jayanta's suggestion below won't help). I'm now using a series of Select, Calculate Field (in the output from Select), Join Field back to the original feature class, then another Calculate Field in the original feature class based on the value in the similar field in the output from Select. Because there are multiple iterations of this sequence, I need to structure the last Calculate Field so that when the value is NULL/None, it doesn't overwrite what's been written in there before. I tried !field_x! if !field_x! is not None but I get the following error: ERROR 000539: SyntaxError: unexpected EOF while parsing (<expression>, line 1) Failed to execute (Calculate Field (2)). I tried putting if !field_x! is not None in the code block, but I get the following warning: ERROR 000989: Python syntax error: Parsing error Indentation error: unexpected indent (line 1) Any help you can offer is appreciated. Thanks a lot!
... View more
08-12-2017
08:24 AM
|
0
|
2
|
3223
|
POST
|
Hello All, I am in the process of creating a geodatabase with related layers for my job where staff use Collector to gather data out in the field. We are currently testing it out and there are already a few improvements I would like to make, while keeping the data that has been entered so far. However, I am pretty new to Collector and AGOL and the only way I've found to make these changes so far is time consuming and a headache. If I export the feature service to a geodatabase, the structure and relationships are different than the original file geodatabase I built. I couldn't find a way to import the new data into my original database, so my process to date has been deleting the original shapefiles, replacing them with the new versions and then having to re-create all the relationships. There has to be a better way! The general changes I am looking for are: adding, re-naming or re-arranging fields; adding to or re-arranging the items in a domain; and creating or editing relationships. Currently, we are using 10.2 and can't update to 10.3 until the end of the year, but we are setting up a virtual computer so I can use 10.3 soon. Thanks for any help you can offer! Deb
... View more
07-13-2015
11:30 AM
|
0
|
0
|
2852
|
Title | Kudos | Posted |
---|---|---|
1 | 08-12-2017 01:26 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|