Well that would make sense on why I am struggling so much
I do show the popup based on a mouse click on the feature. I just have the content formatted at the start of the script and then assign that mgmtTractPopupBox variable to the infotemplate property of a feature layer I define later.
var mgmtTractPopupBox = new InfoTemplate();
mgmtTractPopupBox.setTitle("${HabitatManagement.DBO.MgmtTracts.StateID} Habitat Management Tract");
mgmtTractPopupBox.setContent(mgmtPopupContent);
var hbMgmtTractFL = new FeatureLayer("https://xxx/rest/services/HabitatMonitoring/HabitatData/MapServer/dynamicLayer", {
refreshInterval: 10,
visible: false,
source: lyrDataSource,
outFields: ["*"],
infoTemplate: mgmtTractPopupBox
});
Possibly important to note, I define the popup on a dynamic layer but when I'm running the related features query, I query the same layer only it's a feature layer instead of a dynamic layer (the regular feature layer is also defined, called queryableMgmtTractFL as seen in my original post.