InfoTemplate to read data from server always

86
1
09-20-2019 05:27 AM
PriyamPaul
New Contributor

Hi,

I was wondering how to force my infoTemplate to read the data each time the popup opens from the server? I have an EDIT button here. If I edit and reopen the poup it opens with the first time load data only. How do I make it load the updated data always?

I was thinking, is it related to the FeatureLayer mode constructor?

0 Kudos
1 Reply
ThanHtetAung_EsriAu
Esri Regular Contributor

Hi Paul,

I believed you have the featurelayer instance which is added into the map.

Call the .refresh() method of that layer after the update is finished.

If you haven't retrieved the featurelayer from the map, better to retrieve from the map first.

Below is just a sample how you can retrieve.

var tmpLayers = this.map.itemInfo.itemData.operationalLayers.filter(lang.hitch(this, function (opLayer) {
return opLayer.url == this.config.mapServiceUrl //This crietria you can change suitable to your need

}));

‍‍‍‍‍
0 Kudos