AnsweredAssumed Answered

JS 4.x Popup content type attachment not showing when return from Search

Question asked by dcoley on Oct 20, 2017
Latest reply on Oct 23, 2017 by dcoley

Hi - I've got a simple popup template defined for my feature layers in js 4.5. I've gotten around domain descriptions not returning in the popup's text content for coded values with some Arcade, but when the popup displays after the Search return, it does not display Attachments.  The popup template displays both content types when returned from a view click.  Feels like a bug to me:

 

plySearchTem = new PopupTemplate({
    title: "{expression/pgmArea} Project",
    content: [{
       type: "text",
       text: "<b>Name:</b> {ProjectName}" +
                "<br><b>CIP#:</b> {ProjectID}" +
                "<br><b>Status:</b> {expression/lStatus}"
       }, {
       type: "attachments"
       }],
    expressionInfos:[{
       name: "pgmArea",
       expression: "When($feature.ProgramArea == 'EI', 'Environmental', $feature.ProgramArea == 'F', 'Facilities',       $feature.ProgramArea == 'M', 'Mobility', $feature.ProgramArea == 'U', 'Utilities', 'Capital')"
       },{
       name: "lStatus",
       expression: "When($feature.LifeCycleStatus == 'ACT', 'Active', $feature.LifeCycleStatus == 'PRP', 'Proposed',       $feature.LifeCycleStatus == 'CAN', 'Canceled', $feature.LifeCycleStatus == 'CLS', 'Closed', 'Other')"
    }],
    overwriteActions: true
    //dockOptions: app.dockOptions*/
});

 

And my search:

 

app.search = new Search({
    container: "searchWidgetDiv",
    view: app.mapView,
    allPlaceholder: "Find Addresses / Projects",
    sources: [{
       locator: new Locator("https://ags2.scgov.net/arcgis/rest/services/WebPointLocator/GeocodeServer"),
       singleLineFieldName: "Single Line Input", //Single Line Input
       name: "Search by Address",
       localSearchOptions: {
       minScale: 300000,
       distance: 10
    },
       placeholder: "Search by Address",
    }, {
       featureLayer: capSearch,
       popup: plySearchTem, //only seems to honor when layer is part of view's added layers?
       //popupOpenOnSelect: true,
       //resultGraphicEnabled: true,
       resultSymbol: new SimpleFillSymbol({
          color: [255,255,0,0.0],
          style: "solid",
          outline: {
             color: [102,0,204],
             width: 5
          }
   }),
    searchFields: ["ProjectName"],
    displayField: "ProjectName",
    exactMatch: false,
    outFields: capFields,
    name: "Search by Project Name",
    placeholder: "Search by Project",
    }]
}); // Add the search widget to the navbar ,"searchWidgetDiv"

 

Any ideas?

Thanks,

David

Outcomes