Sorry if this has been covered, but I searched and didn't find an answer.
I'm having issues getting a maximum of 1,000 results back from the eSearch widget. If I do a 1,500 meter buffer and do a search on the parcels, it should return in the 10,000s, but it always seems to cap it at 1,000. I've combed through the config and stuff and I can't seem to find where I can open this up to allowing more results. Any suggestions?
The eSearch widget will return what ever the max record count for the map service is set to. So it has nothing to do with the widget it is the mapserver max record count that has to be adjusted.
DAVID DAS interesting. Very nice looking app! Great work. I have heard of Geocortex but have not used it. So I'll check this out the trial. I think however the Screening Tool I might be able to tailor a bit to replicate this concept. Also, I saw how to use eSearch for input in to Infographics (an out-of-the-box the Esri widget) while experimenting, which provide slick capability for visualizing various attributes. Here is my Work in Progress app for property search. I put the Infographics in the $ Analysis tool.
I downloaded the 2.6 version of this widget, and I love the functionality. The problem that I am experiencing is that in the results tab, only when you click on the first result in the list does it zoom to the result. Any of the other results that are in the list, when you click on them, they do nothing. Is this a known bug that you are planning on fixing, or is there something in the configuration that I am doing wrong?
Thanks for all of your hard work on the WAB widgets.
Yes I am using 2.6.1 version. This is the error that I get when I click on the 2nd result in the list.
SCRIPT5007: Unable to get property 'toJson' of undefined or null reference File: Widget.js, Line: 3846, Column: 11
The layer that I am using gets its information from a table view, so I’m not sure if that’s an issue. It seems to be an issue for the stock Query widget (that won’t even allow me to query), and I was hoping your widget would fix that issue.
No my widget does not support feature without geometry yet either. I am working on this in version 2.9 of my widget (support for no geographic feature queries).
The features have geometry (latitude, longitude, and shape fields), they just don’t have an object id, which is the problem with the query widget (and I have a feeling the zoom capabilities on yours).
Hmm.. I fixed an issue with spatial views and not ObjectId field in the 2.6.0.1 version. Are you sure you are using the 2.6.1 version of the widget? You can check by holding the alt key and clicking on the widget.
On the page where you can download the 2.7 zip file, there is a place where is says download latest 2.6 version. That is the one that I clicked on to download. I am using WAB Developer Edition 2.7, and all it does is opens the widget when I hold the alt key and click on it.
I tried to use the 2.7 version and had the same problem with the zooming, so that’s why I downloaded the latest 2.6 version to see if it was a version issue. The WAB still shows that it is version 2.7, even though I deleted that one and pasted the latest 2.6 version in the folder.
That makes much more sense according to where you are getting the error from tells me that you are using 2.7 version of the widget. Moving down to 2.6 will not help. So the error is saying that there is no graphic in the result item, therefore it can not clone the graphic to show the selection symbol on the map. So the question is why is there no graphic attached to the result item. Unfortunately I have no way of knowing that as it stands now.
I'm using version 2.6.1.1 and noticed a bug when handling services that are secured/restricted to users/group within Portal. The layer item is removed from the pull down menu when querying "By Shape" but not from the pull down menu when querying "By Value".
Let me clarify. If the user does not have permissions and cancels/closes the login window, there's a message that the layer will be removed from the widget. However, it looks like it's only removed from the pull down menu under the By Shape tab and not from the By Value tab. Hope this helps.
I have been using the Enhanced Search Widget for the past 2 years (Enhanced Search ver 2.3 or WAB Dev. Ed. ver 2.3 PFA 10.4). This was running extremely smoothly so far. All of a sudden I find that it takes a very long time for the widget to fetch data (total records 57,000). Even when I create a fresh search deleting the existing widget, at the time of configuring the widget when I enter Unique values for queries, it takes more than a minute to get to 2000 out of 57000 another minute and more to get to 4000 out of 57000.
In the past 2 years, it has never behaved so.
I am also using the standard Esri Query widget for a different purpose and that continues to work very fast.
I am completely baffled by this. Please help me understand why could this be happening and what would be the solution?
So it sounds like you have not changed the eSeach widget code. So did your service change some way? Did you upgrade your ArcGIS Server? Or did you re-publish the map service?
I am not sure the method the Query widget uses to get unique values, but my method is most likely different. There must have been some setting change made when the service was re-published for it to act so differently using the same code. It is hard for me to know what might have changed in your service. What about the max number of records that the service returns (the default is 1000). Did you have that value set higher and now it is back at 1000? What about the number of service instances for this map service?
EDIT: What I have found is that the Query widget will get the first 1000 unique values and add them to the dropdown and if your service has more then that it will NOT list those in the dropdown until you scroll past the first 1000 choices. Where as my method is to query the max records (i.e. 1000) until it reaches then total record count for the service and add all the unique values to the dropdown from the beginning. But my method of getting unique vals has not changed the only thing that has changed is your service...?
There is something amiss with my service. I checked eSearch on another application and service with 1.6 Mn records and performance is not that poor. Total no. of records returned has been set at 2000 and instances are min 1 and max 2.
We have several WAB applications deployed that were developed with various versions of Web AppBuilder (Developer Edition), many of which have the Enhanced Search widget. We're planning an entire rebuild and redeploy of all of these WAB products using the most current Web AppBuilder (Developer Edition) version 2.9.
Will the current eSearch widget version 2.7 work or should we reconsider?
I have a requirement to set the "Search Layer" on load of the application based upon a url parameter value. Something like this, where "queryLayer=structure" so make the Search layer default to the preconfigured "Structures" search rather than the default "Sites" search:
I've got the easy part to get the url parameter value, but I'm hesitant to ruin your perfectly good search widget with my feeble attempt to modify it. I figured it best to get your feedback and perhaps some tips on how best to try and implement this.
Here's my attempt. I've updated the "_initLayerSelect" function (around line #1106), my edit here is an additional else if from the "if (myObject.esearch){" and has a crude/simplistic reset of the aIndex variable. Then I just copied what I thought "sets up" the default widget search when it loads. This actually seems to work! However:
1. The default label in the dropdown doesn't change.
2. It's untested to reveal what other thing(s) it may have broken elsewhere!
This was a while ago and had to drop the attempt but I did try to add what I thought you said were the changes (lines 48 thru 56 of your code sample) but it didn't do what I was expecting. Here's what I implemented before but the widget loads with the Search Layer (index 0) and I didn't quite understand how this gets the url parameter and apply the logic to set that search layer based upon that parameter value.
Ah, I think I understand and will give that a go. My bad.
Thanks again.
Edit: I think what I implemented will work and has much less alterations made to the original codebase and probably less chance of negative impacting that excellent widget!
I love the functionality of removing <null> values from the results popups, but the format of those windows are hard to read. Where can I find the bit of code that removes the null values from results so that I may try and put it in my popup?
Hi Robert, Thanks for the great widget. We are wondering if we are missing something. We have added the driving directions widget and since enabling credit usage in the dev settings for that widget, the eSearch widget is showing a Save to my Content option under the result list option drop down. We would prefer to not have this option shown, but we can't find a setting to disable this functionality. It appears it is part of the select widget functionality that can be disabled, but with your widget it doesn't show with the other export options such as GeoJSON, CSV, etc.
Hi Robert, I'm trying to upgrade your widget from 2.7 to 2.9. I've copied the new one into the folders, apps and stemapp but the widget is still showing as version 2.7. Is the new download link correct? Thanks!
So, I am terribly sorry if this has been asked before but I had a question about passing a dynamic URL into the Enhanced Search widget. Is this possible? We have an internal appraisal system that has a button that passes the Parcel Number of the property card they are viewing and then opens up a JavaScript app where that Parcel Number has already been passed into the search function. We have been running into issues using this same logic in the out of the box Esri search widget in Web AppBuilder and so I wanted to see if there was a way to pass those search values into your widget to product the same results? Thanks!
Currently no. I am not adding this to the menu it is something that is coming default in WAB. I will have to add a setting to remove this in a future release.
I am using eSearch version 2.3 in an application. On running the search, the Results Tab shows all selected attributes in one line and one has to scroll through to read the values. The help document and the demo site shows the attributes displayed as one per line. What am I doing wrong here? The screenshot of my application is attached for your reference.
As I have shown you in my previous reply (the image showing 2.3 displaying results correctly) the 2.3 version of the eSearch does not show results on one line like your app is. So it has to be some customization you have made to your app that is affecting the results display. As for the extent question The setting is shown in the help documentation:
';
}
}
}
catch(e){
}
}
}
if (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase()) {
if (trLabelsHtml != "") {
var labelSname = "";
if(labelEle[i].querySelector("ul li:nth-child(1)").getAttribute("aria-hidden")){
labelSname = labelEle[i].querySelector("ul li:nth-child(1)").outerHTML;
}
labelEle[i].innerHTML = "";
labelEle[i].innerHTML = labelSname + trLabelsHtml;
}
}
}
}
}
catch(e){
}
}
}
/* V 2.0:3 = Store not translated reply id */
if(lingoRSXML.snapshotLength == 0){
if($scope.falseReplyID == "") {
$scope.falseReplyID = value;
}
}
/* Get translated Body of Replies/Comments */
var lingoRBXML = doc.evaluate(lingoRBExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for(var i=0;i 0) {
var attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('div.custom-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else if(rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('#attachments').length > 0){
if ("TkbArticlePage" == "BlogArticlePage") {
attachDiv = rootElement.querySelector('div.lia-quilt-row-main .lia-message-body-content').querySelector('#attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else{
attachDiv = "";
}
}else{
attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('#attachments').outerHTML;
}
}
else {
attachDiv = "";
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var k = 0; k < feedbackDivs.length; k++) {
feedbackDiv = feedbackDiv + feedbackDivs[k].outerHTML;
}
}
}
else {
var attachDiv = rootElement.querySelector('div.lia-message-body-content').querySelector('div.Attachments.preview-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
} else {
attachDiv = "";
}
/* Everyone tags links */
if (document.querySelectorAll("div.TagList").length > 0){
var everyoneTagslink = document.querySelector('div.lia-quilt-row-main').querySelector(".MessageTagsTaplet .TagList");
if ((everyoneTagslink != null)||(everyoneTagslink != undefined)){
everyoneTagslink = everyoneTagslink.outerHTML;
}
else{
everyoneTagslink = "";
}
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-message-body-content').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var m = 0; m < feedbackDivs.length; m++) {
feedbackDiv = feedbackDiv + feedbackDivs[m].outerHTML;
}
}
}
}
} catch (e) {
}
if (body_L == "") {
/* V 2.0:7 Replacing translated video data with source video data */
var newBodyVideoData = newBody.querySelectorAll('div[class*="video-embed"]');
angular.forEach($scope.videoData[value], function (sourceVideoElement, index) {
if (index <= (newBodyVideoData.length - 1)) {
newBodyVideoData[index].outerHTML = sourceVideoElement.outerHTML
}
});
/* V 2.0:7 = Replacing translated image data with source data */
var newBodyImageData = newBody.querySelectorAll('[class*="lia-image"]');
angular.forEach($scope.imageData[value], function (sourceImgElement, index) {
if (index <= (newBodyImageData.length - 1)) {
newBodyImageData[index].outerHTML = sourceImgElement.outerHTML;
}
});
/* V 2.0:7 = Replacing translated pre tag data with source data */
var newBodyPreTagData = newBody.querySelectorAll('pre');
angular.forEach($scope.preTagData[value], function (sourcePreTagElement, index) {
if (index <= (newBodyPreTagData.length - 1)) {
newBodyPreTagData[index].outerHTML = sourcePreTagElement.outerHTML;
}
});
}
var copyBodySubject = false;
if (body_L == "") {
copyBodySubject = true;
body_L = newBody.innerHTML;
}
/* This code is written as part of video fix by iTalent */
/* try{
var iframeHTMLText = body_L;
var searchIframeText = "<IFRAME";
var foundiFrameTag;
if (iframeHTMLText.indexOf(searchIframeText) > -1) {
foundiFrameTag = decodeHTMLEntities(iframeHTMLText);
foundiFrameTag = foundiFrameTag.split('src="')[1];
body_L = foundiFrameTag;
}
}
catch(e){
} */
/* This code is placed to remove the extra meta tag adding in the UI*/
try{
body_L = body_L.replace('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />','');
}
catch(e){
}
/** We should not replace the source content if user profile language and selected target language matches with source language **/
if(showTrContent) {
var compiled = false;
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = null
if("TkbArticlePage"=="IdeaPage"){
// var customAttachDiv = '';
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
compiled = true;
/* Attach atttach div */
// document.querySelector("div.translation-attachments-"+value).innerHTML = attachDiv;
rootElement.querySelectorAll('div.lia-message-body-content')[0].insertAdjacentHTML('afterend',attachDiv);
if(rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message').length > 1){
rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message')[1].remove();
}
} else {
if("TkbArticlePage"=="TkbArticlePage"){
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
}else{
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv + attachDiv;
compiled = true;
}
}
/* Destroy and recreate OOyala player videos to restore the videos in target languages which is written by iTalent as part of iTrack LILICON-79 */ /* Destroy and recreate OOyala player videos */
try{
// $scope.videoData[value][0].querySelector("div").getAttribute("id");
for(var vidIndex=0; vidIndex<$scope.videoData[value].length; vidIndex++){
if( $scope.videoData[value][vidIndex].querySelector("div") != null){
var containerId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].containerId;
videoId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].videoId;
/** Get the Video object */
vid = OO.Player.create(containerId,videoId);
/** Destroy the video **/
vid.destroy();
/** recreate in the same position */
var vid = OO.Player.create(containerId,videoId);
}
}
}
catch(e){
}
try{
for(var vidIndex=0; vidIndex<($scope.videoData[value].length); vidIndex++){
if($scope.videoData[value][vidIndex].querySelector('video-js') != null){
var data_id = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-video-id');
var data_account = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-account');
var data_palyer = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-player');
var div = document.createElement('div');
div.id = "brightcove";
div.class = "brightcove-player";
div.innerHTML =
'(view in my videos)'
var data = div.getElementsByClassName("video-js");
var script = document.createElement('script');
script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js";
for(var i=0;i< data.length;i++){
videodata.push(data[i]);
}
}
}
for(var i=0;i< videodata.length;i++){
document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML;
document.body.appendChild(script);
}
}
catch(e){
}
if(!compiled){
/* Re compile html */
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
}
}
if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) {
/* Adding Translation flag */
var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) {
return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase()
});
if (tr_obj.length > 0) {
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.".replace(/lilicon-trans-text/g, tr_obj[0].title);
try {
if ($scope.wootMessages[$rootScope.profLang] != undefined) {
tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title);
}
} catch (e) {
}
} else {
//tr_text = "This message was translated for your convenience!";
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.";
}
try {
if (!document.getElementById("tr-msz-" + value)) {
var tr_para = document.createElement("P");
tr_para.setAttribute("id", "tr-msz-" + value);
tr_para.setAttribute("class", "tr-msz");
tr_para.style.textAlign = 'justify';
var tr_fTag = document.createElement("IMG");
tr_fTag.setAttribute("class", "tFlag");
tr_fTag.setAttribute("src", "/html/assets/langTrFlag.PNG");
tr_fTag.style.marginRight = "5px";
tr_fTag.style.height = "14px";
tr_para.appendChild(tr_fTag);
var tr_textNode = document.createTextNode(tr_text);
tr_para.appendChild(tr_textNode);
/* Woot message only for multi source */
if(rootElement.querySelector(".lia-quilt-forum-message")){
rootElement.querySelector(".lia-quilt-forum-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) {
rootElement.querySelector(".lia-message-view-blog-topic-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){
rootElement.querySelector(".lia-quilt-blog-reply-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-message")){
rootElement.querySelector(".lia-quilt-tkb-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){
rootElement.querySelector(".lia-quilt-tkb-reply-message").insertBefore(tr_para,rootElement.querySelector(".lia-quilt-row.lia-quilt-row-footer"));
} else if(rootElement.querySelector(".lia-quilt-idea-message")){
rootElement.querySelector(".lia-quilt-idea-message").appendChild(tr_para);
} else if(rootElement.querySelector('.lia-quilt-occasion-message')){
rootElement.querySelector('.lia-quilt-occasion-message').appendChild(tr_para);
}
else {
if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) {
rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para);
} else {
rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para);
}
}
}
} catch (e) {
}
}
} else {
/* Do not display button for same language */
// syncList.remove(value);
var index = $scope.syncList.indexOf(value);
if (index > -1) {
$scope.syncList.splice(index, 1);
}
}
}
}
});
});
/* V 1.1:2 = Reply Sync button for multi source translation */
} catch(e){
console.log(e);
}
};
if((rContent != undefined) && (rContent != "")) {
drawCanvas(decodeURIComponent(rContent));
/** Update variable with selected language code **/
$scope.previousSelCode = code_l;
}
};
/**
* @function manageTranslation
* @description Managess the translation of given language for the thread
* @param {string} langCode - Language Code
* @param {string} tid - Thread ID
*/
$scope.manageTranslation = function (langCode, tid) {
//debugger;
$scope.showTrText = false;
/* V 2.0:5 = actualStatus variable introduced to indicate detailed connector status on UI. This variable holds the actual translation percentage */
$scope.transPercent = "";
$scope.actualStatus = "";
if (tid != "") {
var bulkTranslation = lithiumPlugin.bulkTranslation(langCode, tid);
bulkTranslation.then(function (trContent) {
if(trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, langCode);
if(langCode != "en-US") {
$scope.showTrText = true;
}
}
if((trContent.status != "NA") && trContent.status != null) {
// $scope.transPercent = String(trContent.status);
$scope.actualStatus = String(trContent.status);
} else {
// $rootScope.errorMsg = "Translation is in progress. Please check again a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
$scope.workbench = trContent.wb;
/* V 2.0:4 = Trigger uncalled or delayed callbacks (documnet uploaded/translation completed from lithium).*/
if(trContent.callback == 'true') {
var trCompletCallback = lithiumPlugin.trCompletCallback(langCode, trContent.docID);
trCompletCallback.then(function (callback){
// $rootScope.errorMsg = "Downloading Translated content in " + langCode + " now. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if (trContent.callback == 'upload') {
var trCompletUpload = lithiumPlugin.trCompletUpload(langCode, trContent.docID);
trCompletUpload.then(function (callback) {
//$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if ("many" == "one") {
$scope.updateOOS();
} else if("SmartConx" == "SmartConx"){
if ("many" == "many"){
$scope.updateOOS();
}
}else if ((trContent.status != null) && trContent.status.includes("100")) {
/* If everything fine then only check Out of Sync status */
$scope.updateOOS();
} else {
/* If translation perccent is less than 100 then show the percentage on UI */
$scope.transPercent = $scope.actualStatus;
}
});
}
}
/**
* @function selectThisLang
* @description Called on select dropdown.
* @param {string} lang - Language code
*
*/
$scope.selectThisLang = function (lang, anonymousFlag) {
/* 1.4:3 Update Analytics on language selection */
try {
setTimeout(()=>{
lingoThreadLangSelected(lang, '910880');
console.log("Language",lang);
},5000)
} catch (e) {
console.log(e);
}
/** Display Translated content **/
var getTranslation = lithiumPlugin.getTranslation(lang, "910880");
getTranslation.then(function (trContent) {
if (trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, lang);
} else {
//$rootScope.errorMsg = "Translation is in progress. Please check again in a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
});
};
var decodeEntities = (function() {
// this prevents any overhead from creating the object each time
var element = document.createElement('div');
function decodeHTMLEntities (str) {
if(str && typeof str === 'string') {
// strip script/html tags
str = str.replace(/