AnsweredAssumed Answered

Search Widget on 3.21

Question asked by seanpha on Sep 13, 2017
Latest reply on Sep 13, 2017 by rastrauch

Am I missing something for my Search Widget? I am trying to customize the widget to search feature layers, but it only recognizes Integers and not String values. I believe my problem stems from my organization's configuration of its REST server. Any help is appreciated. I am running this in CMV 2.0.0beta2









], function (Locator, Search, FeatureLayer, InfoTemplate, has) {

return {

   map: true,

   mapRightClickMenu: true,

   enableInfoWindow: true,

   enableButtonMode: has('mobile') ? false : true,

   expanded: true,

   enableSuggestions: true,

   allPlaceholder: 'Find an address or APN',

         sources: [{

            placeholder: 'Find an address',

            locator: new Locator(''),

            singleLineFieldName: 'SingleLine',

            outFields: ['Loc_name'],

            name: 'Address Search',

            localSearchOptions: { minScale: 300000, distance: 50000 }

}, {

            featureLayer: new FeatureLayer(''),

            searchFields: ["APN"],

            name: "Assessor's Parcel Number",

            displayField: "APN",

            exactMatch: false,

            outFields: ["*"],

            placeholder: 'APN - ex 1470950400',

            maxResults: 6,

            maxSuggestions: 6,

            minCharacters: 0,

            infoTemplate: new InfoTemplate("Search result", "APN: ${APN}"),

    }] };