Why do I get "The given key was not present in the dictionary" when referencing an Attribute for an Address Candidate that is clearly there?
Essentials 4.4.3 HTML5 2.5.2
I trying to use an Attribute from my Address Candidate returned from a geocoding avtivity in a workflow. As far as I can determine, based on the geocode service endpoint, "Address" and "Match_addr" are both attributes of the Address Candidate. When I try to reference either with this syntax:
geocodeResults(0).Attributes("Address").ToString
The workflow validates the syntax, but returns an error in runtime:
The given key was not present in the dictionary
This would seem to indicate that the attribute is not there as Address or Match_addr, but I don't know how else an attribute of a service endpoint would be named other than how it is shown at the service endpoint.
Does anyone have any suggestions why the attribute would return this error when it appears to be present? Here is the geocode result from the service endpoint:
Address Candidates: (# address candidates : 62)
Shape:
Point:
X: 3131915.6898709456
Y: 1.0112783258712722E7
Score: 100.0
Address: 11401 TEDFORD ST, AUSTIN, TX, 78753
Score: 100
Match_addr: 11401 TEDFORD ST, AUSTIN, TX, 78753
House: 11401
PreDir:
PreType:
StreetName: TEDFORD
SufType: ST
SufDir:
BldgSubAddrType:
BldgSubAddrUnit:
SubAddrType:
SubAddrUnit:
City: AUSTIN
State: TX
ZIP: 78753
PlaceID: 251286
Segment_ID: 2010117
User_fld: 0
Jurisdiction: 210
JurisdictionLabel: AUSTIN FULL PURPOSE
KappaGrid: MM32
KappaPage: 496Q
Addr_type: PointAddress
0
-
The result of the geocode activity is an IEnumerable List of address candidates, not a list of candidates. By assigning the geocode result to an actual ESRI.ArcGIS.Client.Tasks.AddressCandidate I'm able to reference the properties and attributes as epxected. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar