Change fields on label in public notification

3814
6
04-29-2015 05:13 AM
City_of_LenexaKansas
New Contributor

Is it possible to change the fields populated in the Avery labels when using the public notificaiton app?  I would like to remove the parcel ID and add a generic addressee field which we have in our address data model. I have changed the parameter that (i was assuming*) passed the fields to the labels here in the code:

but I still get the whole parcelID, owner names, etc

Anyone know where to make this change to the fields on the labels?  Much appreciated!

*not a programmer.

0 Kudos
6 Replies
LuciHawkins
Occasional Contributor III

The  config.js   file sets all of the map and query parameters.  So as long as you are setting the proper map to query and the fields in that map to use for the avery labels then all should work. 

This is the part of the config.js file that sets the map that will be queried.

// Map Services for operational layers

TaxParcelPublishingLayer: "yourRESTlayerNamegoeshere",

When it queries the above rest layer, it will snag whatever fields you have in this part of the config.js to fill the avery label.  In my case, I use different fields also and everything works as it should:

//Fields for Avery labels

AveryFieldsCollection: ["OWNER_NAME", "ADDRESS_1", "ADDRESS_2,ADDRESS_3", "CITY_NAME,ST,ZIPCODE"],

Hope this helps,

Luci

0 Kudos
City_of_LenexaKansas
New Contributor

Thanks Luci - that's exactly what I did.  I don't know if you can tell, but from the screen shots I do not have a parcelID in the AveryFieldsCollection, yet it's the first line on the label.  That's where I'm completely confused...

This actually does work as expected for the Property Owner, it's only for selecting propery occupant that it fails.

0 Kudos
LuciHawkins
Occasional Contributor III

When the "Occupants" box is checked, it uses a different field list.  In the   config.js   file, change the following to the fields you want in your label:

//Name of the occupant

OccupantName: "Occupant",

//Fields of the occupant

OccupantFields: "PIN,HOUSE_NO,HSESUF,STREET,ST_MD",

Thanks,

Luci

0 Kudos
deleted-user-AzQ5lcTQbS2a
New Contributor III

so close!


I do get the site address, city, state, zip though it prints all on a single line and out of order, like this:

     SiteAddress

     Occupant

     City

     State

     Zip

I really don't want the OccupantName to come from the code or from that input box, but rather from the "ADDRESSEE" field in our data, so now my question has morphed somewhat in order to figure out where that is passed to the GenerateLabels GP tool.  It looks like it should be from that array listed above.  Mine looks like this:

     OccupantFields: "ADDRESSEE","SITEADDRESS","SITECITY","SITESTATE","SITEZIP",

Thanks again for your assistance!

0 Kudos
LuciHawkins
Occasional Contributor III

Hey Stacey,

Make sure the two lines in the config.js file for the Occupant look like this:

//Name of the occupant

OccupantName: "ADDRESSEE",

 

//Fields of the occupant

OccupantFields: "SITEADDRESS, SITECITY, SITESTATE, SITEZIP",

I don't know why they formatted those fields differently than the AveryFieldsCollection but they did.  Notice the ADDRESSEE is by itself for Occupant.  Remove the " marks in the OccupantFields - Only one " at the beginning and one " at the end.

Thanks,

Luci 

deleted-user-AzQ5lcTQbS2a
New Contributor III

After a couple of days banging my head against the wall, I finally enlisted the assistance of one of our programmers and she completed the following changes:

FileLineChange
config.js280Commented out OccupantLabel (not needed anymore)
config.js283Old acceptable format was values like "ADDRESSE, SITEADDRESS, SITECITY" and did not let you format multiple fields on a line. New format is ["ADDRESSE","SITEADDRESS", "SITECITY,SITESTATE"] and will put fields in the same "" on the same line (like owner).
infoWindow.html66 & 69Commented out references to OccupantLabel.
infoWindow.js74Commented out reference to textoccupant (OccupantLabel).
infoWindowView.js91Commented out reference to textoccupant (OccupantLabel).
infoWindowView.js504Commented out string split on occupantFields, reinstated modified line on 532 but could have been left in upper location. Makes more sense to have it closer to it's first call though.
infoWindowView.js531+Commented out if statement inserting occupant label into output. This gets rid of a blank line.
infoWindowView.js581Revised the split string as on line 504, revised version is immediately below here.
infoWindowView.js612+Commented out the if statement inserting occupant label into output like 531+.@

City of Lenexa