Search Widget - Info window with web link

3272
7
Jump to solution
04-22-2016 08:26 AM
LeonS
by
Occasional Contributor II

Hello,

I'm having an issue with the info window that comes up from clicking a search result.   The info window content is defined by the pop-up I defined in my web map using a custom attribute display.  Part of the pop-up content contains a web link that uses a parameter from my parcel data to open the correct property record.  The pop-up works correctly if I click on the map to identify the property.  However, it seems the info window has an issue evaluating the parameter and does not generate the correct web link

Instead of -   http://gis.vgsi.com/eastonma/Parcel.aspx?pid=3798

The info window creates this bad link - http://gis.vgsi.com/eastonma/Parcel.aspx?pid=<span class%3D"jimu-numeric-value">3798<%Fspan>

Has anyone run into this?

Thanks,

Leon

0 Kudos
1 Solution

Accepted Solutions
LeonS
by
Occasional Contributor II

With thanks to Esri support, this issue was resolved.  See below...

To summarize the case we resolved the case by avoiding number variable to string. We made changes under jimu.js/utils.js file. Following is the modified code snippet.
getFormattedNumber: function(num, format) {
if (typeof num === 'number') {
return num;
});
}
return num;
},

View solution in original post

7 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Leon,

  I have seen someone mention this before but I don't know if they logged it with esri tech support as a bug. You should do just that. Call tech support and report this. The more people they have calling about a bug the high priority it gets.

0 Kudos
LeonS
by
Occasional Contributor II

Thanks for the reply, I'll do that.  In the interim, I can add a field to hold the entire url. Not ideal, but it will work for this scenario

LeonS
by
Occasional Contributor II

With thanks to Esri support, this issue was resolved.  See below...

To summarize the case we resolved the case by avoiding number variable to string. We made changes under jimu.js/utils.js file. Following is the modified code snippet.
getFormattedNumber: function(num, format) {
if (typeof num === 'number') {
return num;
});
}
return num;
},

JohnPlunkett
Esri Contributor

HI Leon

Your reply was not exactly clear

Did you republish the Feature Service and change the field type of the Parcel ID?

0 Kudos
LeonS
by
Occasional Contributor II

Hi John,

The field I was having an issue with is a long integer field.   There were no changes made the feature service or underlying data to get it to work.  The solution was a modification the code for 'getFormattedNumber' function within the jimu.js/utils.js file, as referenced above. 

Leon

0 Kudos
JohnPlunkett
Esri Contributor

Hi Leon,

From what you are doing there were you using WebApp Builder for Developers and configured the Search widget?

Thanks

John

0 Kudos
LeonS
by
Occasional Contributor II

Yes, I reported the problem using Web App Builder for Developers 2.0, though I noticed it occurs at 1.3 version as well.  The search widget is configured with two sources; a locator and also a query of a layer from my web map that defines the pop-up.  Here is the config...

{

  "allPlaceholder": "Search",

  "showInfoWindowOnSelect": true,

  "sources":[

  {

    "url": "http://YOURSERVER/arcgis/rest/services/YOURLOCATOR/GeocodeServer",

    "name": "Address/Street/Placename",

    "singleLineFieldName": "SingleLine",

    "placeholder": "Search",

    "maxResults": 6,

    "type": "locator"

  },{

    "layerId": "TaxParcels_7256",

    "url": "http://services2.arcgis.com/YOURORG/arcgis/rest/services/YOURSERVICE/FeatureServer/0",

    "name": "Parcel ID",

    "placeholder": "Parcel ID",

    "searchFields": ["PARCELID"],

    "displayField": "PARCELID",

    "exactMatch": true,

    "maxResults": 6,

    "type": "query"

  }]

}

0 Kudos