Editor Widget Template Picker - Grouped Value Symbology

1459
10
Jump to solution
10-12-2021 10:54 AM
MarkEastwood
Occasional Contributor II

Hi All,

I am wanting to get the web app builder for developer (v 2.17) smart editor widget to only show a subset of feature templates. 

The problem I am having is shown below.

I have a feature service that is symbolized using two fields. I have then grouped values to get the layer to symbolize the way I want.

MarkEastwood_0-1634061081795.png

When I add this layer to the editor widget I get a bunch of templates that I don't want to present to users.

MarkEastwood_1-1634061195998.png

 

Is there a way to hide some of the templates so users are unable to select them when creating new features?

 

0 Kudos
1 Solution

Accepted Solutions
AlixVezina
Esri Regular Contributor

Right!! I follow now, I'm sorry it took so much back an forth. I thought the templates were showing unexpectedly.
Short answer is no, you cannot hide templates without customizing the code for the template picker, for which I provided more details in an above comment.

View solution in original post

10 Replies
AlixVezina
Esri Regular Contributor

Hi @MarkEastwood ,

I've tried a similar workflow on my end and here's what I observe:
AlixVezina_0-1634227950697.png

It appears I am getting the correct templates in the Smart Editor:

AlixVezina_1-1634229169610.png

Do you recall making any changes to the layer symbology before or after adding it to the Web AppBuilder application? Sometimes this may affect the way the templates are displayed in the Smart Editor widget.

There is no way to directly customize the templates in the Smart Editor .

0 Kudos
MarkEastwood
Occasional Contributor II

Hi @AlixVezina,

Thanks for your response. It looks like your workflow is similar but your grouped values are a bit neater then mine. My grouped values have multiple options (Encroachment, <NULL>; Encroachment, No) where yours only have one (Blue, 1).

Maybe someone has any idea of how to customize the Smart Editor code to hide templates?

AlixVezina
Esri Regular Contributor

You are correct, my test was incomplete, my apologies.

I've tried this again and added more combinations, which would get closer to your configuration I believe. It appears the symbology I've set in ArcGIS Pro still aligns with what I see in the Template Picker.

AlixVezina_0-1634313084088.png

AlixVezina_1-1634313329509.png

Before going down the customization route, I would suggest trying a few things:

1. Add the Edit widget to your application and see how the templates display there. They should display the same as in the Smart Editor. If they don't, please contact Esri Support so they can help troubleshoot the problem with Smart Editor.

2. If the templates are the same in the Edit widget and Smart Editor, republish the service and create a new web map and application, and make sure the service symbology is not updated after being published. Any changes you make to the symbology after having published the service may affect the way this is displayed in the template picker. If you did make changes in the web map, you would need to make sure those changes are saved against the hosted layer / service endpoint - but the behavior there could be inconsistent.

3. If still no luck, please contact Esri Support, as it is possible you are experiencing an issue for your specific use case, or there could be a known bug with an available workaround.

Regarding modifying the code, someone would need to customize the template picker which actually comes directly from the JSAPI and is a core component rather than specific to the Smart Editor. If you want to modify it, you would need to grab a local copy of the API. It is not the most straightforward process. These links may be helpful:

Using Bower for Custom Builds of the ArcGIS API for JavaScript | Guide | ArcGIS API for JavaScript 3...

TemplatePicker (legacy) | API Reference | ArcGIS API for JavaScript 3.38

custom template picker to have only specific  item... - Esri Community

0 Kudos
MarkEastwood
Occasional Contributor II

Hi @AlixVezina,

I still think your test is missing one key component. None of your symbology classes are being grouped like my setup has it. You have unique values set up on multiple fields like I do. But after that is configured I have grouped some of the values.

For example, some of my existing data has values like (Encroachment, <Null>) and (Encroachment, No). I have grouped these values cause they mean the same thing to my users. Moving forward, I only want them to be able to add new features assigned to (Encroachment, No). Which is why I want to hide some feature templates from the Smart Editor widget. 

I realize that I can clean up the data so there are no nulls but having the symbology set up the way I do is what my organization wants. 

Thanks again for your help. 

0 Kudos
AlixVezina
Esri Regular Contributor

@MarkEastwood Please are you able to share a copy of your service with its symbology with me through an ArcGIS Online Group? It will be difficult for me to replicate exactly what you did through chat and comments. My username is AlixSolutions.

0 Kudos
AlixVezina
Esri Regular Contributor

If my understanding is right, this is the step I missed?

AlixVezina_0-1634314880970.png

 

0 Kudos
MarkEastwood
Occasional Contributor II

Yes @AlixVezina that is the step you missed. If you add that to the Smart Editor (B, 1) and (B, 2) will show up as templates. Which makes sense but I was wondering if it was possible to hide one of those templates from the Smart Editor. 

AlixVezina
Esri Regular Contributor

Right!! I follow now, I'm sorry it took so much back an forth. I thought the templates were showing unexpectedly.
Short answer is no, you cannot hide templates without customizing the code for the template picker, for which I provided more details in an above comment.

MarkEastwood
Occasional Contributor II

Okay, thanks again for your help!

0 Kudos