Skip to main content

Changing attributes displayed in result details from geocoding service

Comments

2 comments

  • Jesse Langdon

    Replying to my own comment. I eventually figured out that I can at least limit the Candidate fields being returned from the geocoding service by adding the fields I want to keep in the Geocode activities “Out Fields” parameter. This must be a simple comma-separated list (no brackets around the list, no quotes around the fields names).

    So, for instance, if I just want to return the matching address, match score, and X/Y coordinates, I would add this to the “Out Fields” parameter:

    I'm still hoping there is a way to alter the returned Candidate field names, for instance changing “Match_addr” to something more readable like “Matching Address”…

    1
  • Zack Robison

    You can totally change those attribute names, I'm not sure about giving them spaces but you could certainly try to give the fields aliases and see if it works.

    I would probably do a renaming in the input to the Create Feature activity “feature1”.  Instead of just passing through the attributes that you want, use a custom object e.g.

    ={
    	Attribute_One: $forEach1.item.attributes.attr1,
    	Attribute_Three: $forEach1.item.attributes.attributeThree,
    	Attribute_Number_Eight: $forEach1.item.attributes.attr8,
    }

    This will get you most of the way there anyway.

    For setting aliases, you could try using a Create Feature Set activity with the array of features as its input.  Then before supplying that activity's .featureSet result to the Show Results feature, try setting the aliases of any .featureSet.fields that you'd like.  You will probably do that in a Set Property activity with some fun JS array functions like .find() to bind to the proper field object.  I'm not positive those fields will be there off hand though, since you'd build the Feature Set in a roundabout way.  There are ways to make that property from scratch but I'd have to figure em out.

    0

Please sign in to leave a comment.