Hi Andy,
As I understood you want to display dropdown based on type and filter results accordingly in the search widget.
You can achieve it by setting definition expression in the feature layer for each type and also add multiple sources for each type.
sources.push({
featureLayer: new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/US_Senators/FeatureServer/0",{
definitionExpression:"name in ('Akaka, Daniel K.','Alexander, Lamar')"
}),
searchFields: ["Name"],
displayField: "Name",
exactMatch: false,
name: "Senator",
outFields: ["*"],
placeholder: "Senator name",
maxResults: 6,
maxSuggestions: 6,
//Create an InfoTemplate
infoTemplate: new InfoTemplate("Senator information",
"Name: ${Name}</br>State: ${State}</br>Party Affiliation: ${Party}</br>Phone No: ${Phone_Number}<br><a href=${Web_Page} target=_blank ;'>Website</a>"
)
Regards,
#itsMeRhitz