Select to view content in your preferred language

Use CodedValueDomain value in LayerSearchSource.suggestionTemplate

457
1
09-07-2021 09:20 AM
EthanBodin1
Occasional Contributor

I am using the Search widget and would like to provide suggestions using a template with a couple of field values. One of the fields may have a coded value domain, and I would like to display the name of the CodedValue instead of the code, which is what shows up if I just enter the field name in the template.

new LayerSearchSource({

   suggestionTemplate: "<b>Field 1: {stringField}<b><br/>Field 2: {codedValueField}"

   ...

}

Is there some way to replace "codedValueField" and get the coded value description for the field?

1 Reply
KevinEscalera1
Emerging Contributor

@EthanBodin1 were you able to find a way to get the display value for a field with coded value domains?

0 Kudos