Template Picker: labels of the templates

3109
3
06-22-2015 07:03 AM
xiannianchen
New Contributor II

Hi, I have questions about the label of the templates of the Template Picker.

For example, this is the templates and the labels after the Template Picker widget is started up.

But the cartography design of the corresponding layer in the MXD is like the following. In the MXD, the label of the symbol is different from the label of the template picker. See the red-boxed items.

Actually, the symbology of the MXD is based on the field of "Status", which include five different value: Retired, Temporary, Pending, Other, and Current.

Actually, the symbology of the MXD is based on the field of "Status", which include five different value: Retired, Temporary, Pending, Other, and Current.

I have one guess: since the template picker is based on the feature layer, the label of the template is not based on the symbol label of the MXD file but based on the actual value of the designed field. Is this guess right?

My template picker is based on feature layer. How can I customize the template label instead of using the actual field values?

Thanks,

0 Kudos
3 Replies
ChrisSergent
Regular Contributor III

Based on Esri's feature service here: Layer: Wildfire Response Points (ID: 0)  It looks like you may need to set the labels for the unique values.

0 Kudos
ShaunFontanella2
New Contributor II

Did you ever figure this out?  Having the same problem.  Initially my template picker was picking up the label instead of the value as seen in the mxd Symbology tab.  Unfortunately after trying to publish one time the service publication process crashed.  I had to delete the service, rename the mxd, and republish and now the app is using the Value instead of the Label even though I have not changed the code.

0 Kudos
ShaunFontanella2
New Contributor II

I figured this out for my case.  The feature service builds the new feature templates in the template picker based on the editing templates (In and editing session) in the map document.  If you create a map document and publish a service without starting an editing session then there are no defined feature templates.  The publishing service will create these templates for you when you publish.  If the publishing process crashes, the templates do not get created but the services thinks that they are there.  It will use the default symbology and labels in the template picker.  No matter what you put in your JS code it will not work.  Trying to publish over the top of it does not work.  If you have problems consistently publishing without crashing, start an editing session before you publish to the server to explicitly define the feature templates and all will be good even if the publishing crashes.

0 Kudos