I'd like to print the map after I did the buffer, but the buffer disappears after the print widget is open. Is there a way to keep the Esearch open when the print is open? this way the buffer graphic is still on the map.
It worked. But the legend for the buffer on the map is weird. It looks like following text, there is no symbol for the buffer, it just says 'Override 1'
I just have a quick question regarding searches on multi point data. I had the esearch working on my point layer just fine, and had to change the data to multi point because there are some locations that share an attribute but are spatially far apart, and now the searches are failing in web app builder. Does this widget work with multi point data?
So I just tested against a MultiPoint and I did not have any issue. So first question is what version of the eSearch and WAB are you using? Next is how are you doing the search (i.e. by value, by graphic, etc)?
Thanks again for looking into this. I am using the newest version of the widget and this is a pull-down search by value. It now is working on and off, so maybe it is not related to the multipoint, especially if it works for you. I will keep troubleshooting, appreciate your time. ☺
I have had my eSearch configured for some time now. Today one of the users at my organization told me it was not working properly. I got on and ran it and got the following:
When I ran the console in Chrome, this is the error I received:
Any ideas on what could be causing this issue? I'm pretty clueless troubleshooting this widget.
It looks to me like you have changed the schema (available fields or the like) for one or more of the search layers configured in your eSearch. Can you remember changing field names or schema on any layer recently?
I haven't changed anything regarding the schema or data whatsoever. So to fix it, do I just need to republish the map and reconfigure? What would you suggest?
Strange that nothing has changed but it is now failing. It the service itself running and OK?
I would start my debugging by creating a new WAB dev app and adding the eSearch and then that layer that is failing and see if you can get it working again. If you can then it is something in the configuration of your old app that needs updating and I would just reconfigure that layer in the eSearch by removing all the fields and then re-adding. Let me know if ether of those fail to work. Strange that nothing has changed but it is now failing.
Robert, thank you for getting back to me. I have found a few problems with other layers, all of which are pulling from SQL Server. I will check it out and as you said, work through it debugging.
I have a problem to configure eSearch, after installing the widget either on Web Appbuilder, simple or developer, I cannot add or modify layers , when I click on Click Add a Search Layer, I get a blank and non-editable field! no new search dialog opens (see picture 1)
on the interface of the map I get the error "create widget error: Widgets / eSearch / Widget" when I click eSearch (see picture 2).
Are you using WAB 2.0? I have not certified eSearch widget for WAB 2.0 yet. Normally you should always keep version numbers the same (i.e. eSearch 1.3.0.2 works for WAB 1.3).
I did tests with Firefox English version, the WAB remains in French, and always the same problems with eSearch, only by changing the language parameters in the Arcgis Online, French to English or language by default, WAB passes in English regardless of the languageof the browser, and eSearch working properly
Thank you Robert for your help, do not hesitate to share us the solution of eSarch bug with WAB French, it's always interesting to find out.
When I set up "between relationship" using eSearch, it seems it does not allow me to set the mini value as 0. If I input 0 and 10000, the expression will be like: "Household_Pop BETWEEN null AND 10000". It has to be a value more than 0. This failed the query. Is there any method to adjust this? Thanks!
When set up a query such as HouseP is at least xxx, when I set it as 'Unique', and select a value say 0 as the default, and also check 'Ask for values' and 'Value is required to be entered to enable search' . After that, when I come to the eSearch platform, the default value display on the screen is not 0, it is always other number. If I set HousP is at most XXX, the default value is also different from I original set up, it is always 1001. Is there any method to make sure the number I set up always display on the screen or let the default input area always empty. Thanks!
When I use 'between expression', if I want control the input value to be less than 100. When users input a value more than that, a popup window or message can popup to let users know that he input a wrong value. Is this possible? It seems the html file is dynamic, I can not locate the input field. Thank you!
This normally means that you are trying to import an app that contains a custom widget that is older then the custom widget that is part of your stemapp widgets folder. Or you are trying to import a 1.3 widget into a 1.2 WAB.
This was working previously, but I'm not certain what has changed or if I've set something incorrectly. I have 2 services configured on this eSearch widget where I'd like the user to be able to perform an attribute/value search on 1 of the service layers, create a buffer around that selected feature and then "Search entities of": the other/2nd service layer -- making a selection from the buffer.
It doesn't error, but it does fail to make the second selection (sort of). It simply selects the features of the 1st service layer intersecting the buffer! Here's the workflow and result:
1. Perform ByValue search on service #1. Success.
2. On BySpatial tab, Apply a search distance of 2 miles and create buffer. Success.
3. On BySpatial tab, Search entities of a different service #2, intersected by the Buffer Graphics. No error. but...
4. The selection is performed on service #1, removing the selection from step 1. and creating the selection.
Jamie, Robert - for clarity, I am finding "this.selectLayerSpatial.addOption(spatialOptions);" on both lines 852 and 889. I'm guessing that the conditional above is placed at 853 and is not part of the error callback on 889?
Apologies, I forgot to mention that I was using an older version of the widget (1.2.0.6). Perhaps my download was behaving oddly or this issue has since been fixed. In my 1.2.0.6 version, even though the actual SQL wouldn't be edited, a user could enter values into the input box and might think those values would be used....
I just tested your latest 2.0.1 version with WABDE 2.0 and it worked as desired.
I would like the active tool to mimic the Theme Color.
When you click on a tool, it disappears.
Same thing happens with the Identify Widget.
Robert, you had to write a thousand line of CSS code to force all your Widget Controls to change color with the selected Theme. This works perfectly with the 7 themes in WAB 1.3.
It also fixes the ESRI Popup once your Enhanced Search Widget is opened.
Would it be possible to extend your fix to this new Plateau Theme in WAB 2.0?
ESRI's Web AppBuilder allows us to tap into thousands of hours of programming effort by you and others in the WAB Developer Community.
I am amazed how easy it has become to deploy stable, fully functional and responsive web applications in a matter of hours.
You took the magic behind your Flex Widgets and made it even better with the Javascript version.
We cannot thank you enough for the countless hours, and weekends of your free time that you have volunteered in advancing this project!
Thanks, I forgot to apply css for the new Plateau theme on my first couple of 2.0.1 widgets but I have added it for the identify I am working on upgrading and will make sure all others I will be upgrading get this as well. I guess I will release a 2.0.1.1 version of eSearch, StreetView, eBasemapGallery, PopupPanel, Share to handle the new theme.
can I set or add spatial query in this widget, which makes intersect, but without polygons, which have in common only boundary with input result polygons. I try to explain it using the added image. I hope it is understandable. I'm sorry for my bad English and thank you for your response.
Hi Robert - I may have noticed a potential conflict between eSearch and Attribute Table widgets. This will take more testing, but I think that when a layer participates in the eSearch widget, the attribute table widget column visibility settings are overridden, i.e all columns are visible. For layers that do not participate in eSeach, attribute table settings apply . .
That would make sense as I control the fields displayed when adding a search result layer to the AT widget from the eSearch based on the fields defined in the eSearch widgets search layer configuration. The AT widget does not know about the eSearch layer result until I add it from the search results and the fact that you may be using the same layer in the AT widget already and have certain fields configured has not bearing as the eSearch result is considered a different layer.
Are you also saying that even if I am not configuring the layer to interact with the AT that, the AT will still display all fields, because that's what I am seeing as well.
Removing eSearch from the equation, Yes if there is a layer in the web map and you have not configured it in AT widget then the layer will be shown using all fields.
Now eSearch back in the equation, the search results for a search layer will only show the fields that are configured in the eSearch widgets setting for that layer. Hope that clears things up.
The workflow I can think of right now is to select your feature like you have in blue and then to swirch to the "by Spatial" tab and input a negavtive number in the buffer distance field (I tested with -15 feet) and click the buffer button and then clicked the "intersected by" button and choose buffer in the message box that appears this way you are using a buffer of the selected parcel that is 15 feet smaller than the original and the intersected by will on return those other feature that are within the original selection.
';
}
}
}
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 {
lingoThreadLangSelected(lang, '910880');
} catch (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(/