Parcel Selection, Buffering, and Report Workflow
Hi, I'm trying to implement the "Parcel Selection, Buffering, and Report Workflow" from the code gallery (ver. 3.10). It works up to the point of creating the where clause then it throws an exception:
'Unable to cast object of type'System.Int32' to type 'System.String'
Is this not because the Object Id's are type Int and they're being stored in the var. _objectIdFieldName as a string? I'm confused about how this is suppose to work...
Also, the instructions state that the 'MapServiceId' property should be the name of the parcels layer. Shouldn't this actually be the # ID of the layer not the name?
Thanks!
Dan
-
I've updated the '3.10' version of this workflow in the download package -- please re-download this and see if it fixes your issue.
Note that there has also been an ObjectIdFieldName parameter added to deal with the case where a join has been made in the layer and this field name is incorrectly reported. You don't have to set it if you are not having any issues with this.
As an aside -- OBJECTIDs are 'supposed' to be integers, but there is quite a lot of inconsistency in the way they are dealt with by the various versions and different interfaces of ESRI's software. So if you are developing your own workflows it is probably best to assume that they could _either_ be integers or strings by the time they get to you, and deal with this accordingly.
The fixes haven't been backported to earlier versions, but we can do this on request if anyone is having issues with the above and cannot upgrade.
0 -
That works. Thanks Jonathan.
0
Please sign in to leave a comment.
Comments
2 comments