|
POST
|
I have an SDE Feature Class and a related SDE Table that were published to an ArcGIS Server Map Service with Feature Access enabled. The ArcGIS Server Map Service is on our internal server and only accessible to members of our Domain. I can edit the Feature Class and Table in a locally hosted Web AppBuilder application, but I can't change any of the popups in the webmap including none editable layers which I have added. I tried to copy the webmap to see if there is an issue with the webmap but that didn't change the behavior. I have also tried to add the Feature Class and SDE Table to a new Map and I still can't configure the popups. The popups work, but no configuration is possible. Thanks, Mele
... View more
06-12-2017
09:57 AM
|
0
|
2
|
1265
|
|
POST
|
Joe, I was thinking of this approach as well. Let ArcSDE create the ObjectID and than duplicate it in a different "ID" field so that it stays original. Thanks for sharing your approach. Mele
... View more
04-11-2017
11:13 AM
|
2
|
1
|
1845
|
|
POST
|
Asrujit, Thanks for you input. Good to hear that it is working for you. It seems like a great way to go to me so I will keep testing with it. Mele
... View more
04-11-2017
09:43 AM
|
0
|
0
|
1845
|
|
POST
|
Ryan, I am not sure about hosting the data (feature class and related table) in AGOL. I am doing everything in my ArcSDE database (Feature Class, Related Table, Relationship Class) I did find this article. FAQ: Does ArcGIS Online support joins and relates? Mele
... View more
04-10-2017
03:27 PM
|
0
|
0
|
2071
|
|
POST
|
I have a feature class of our Sign Posts and a table of Signs. The signs are related to the SignPosts. I was struggling with trying to update a unique ID in Web AppBuilder so I contacted ESRI. I was looking at a trigger in ArcSDE, but ESRI support told me that that is not supported. The ESRI support Analyst said, why not use the ObjectID? I always thought this was not encouraged because ObjectIDs can change when exporting. Is this a change in thinking from ESRI or was my understanding wrong all along? What are the downsides of using the ObjectID other than the export issues? Using the ObjectID certainly makes life easier for me, but was surprised to hear ESRI suggest this. Thanks, Mele
... View more
04-10-2017
10:02 AM
|
0
|
5
|
2588
|
|
POST
|
It looks like my issue was with the identifyParams.tolerance setting. In my code I am using the Search Widget to get a point from our Addresses Feature Class. I then take that point and perform and IdentifyTask against our Solid Waste Route Feature Classes. The first time through the code, the identifyParams.mapExtent is set to map.extent; which is the full city. The tolerance was selecting nearby polygons. I am not showing the map I am using in my code so maybe this is impacting things, but decreasing the tolerance setting looks to have solved my issue. Mele
... View more
03-14-2017
09:51 AM
|
0
|
0
|
696
|
|
POST
|
I am executing an Identify Task in ArcGIS Javascript. The first time I open my HTML containing this code, I get 'extra' results that should not be in their. When I run the Identify again without reloading the HTML, the results look correct. Is something being cached on the Deferred? How do I clear out any results so that this code executes without returning erroneous records? Thanks, Mele function executeIdentifyTask (event) {
search.set("value", search.selectedResult.name);
var resultItems = [];
dom.byId("info").innerHTML = "";
event.result.feature;
identifyParams.geometry = event.result.feature.geometry;
identifyParams.mapExtent = map.extent;
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
var featureAttributes = event.result.feature.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response){
return arrayUtils.map(response, function (result) {
var feature = result.feature;
var layerName = result.layerName;
feature.attributes.layerName = layerName;
if (layerName === 'Brush Collection') {
//alert(feature.attributes['Area']);
resultItems.push("<b>" + "Brush Area: " + "</b> " + feature.attributes['Area'] + "<br>");
}
else if (layerName === 'Refuse Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Refuse Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
else if (layerName === 'Recycling Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Recycling Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
//return feature;
dom.byId("info").innerHTML = resultItems.join("");
});
});
}
... View more
03-13-2017
04:41 PM
|
0
|
2
|
1025
|
|
POST
|
I that it had to be something simple, but I was too close to it to see it. Thanks Robert for finding the error in my script. It is working now. Mele
... View more
03-13-2017
08:06 AM
|
0
|
0
|
2880
|
|
POST
|
I am getting a TypeError: d.toJson is not a function on IdentifyTask.execute(identifyParams) I am guessing that I am missing something obvious, but the error is not pointing me in the right direction. Thanks, Mele <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="https://js.arcgis.com/3.19/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.19/esri/css/esri.css">
<script src="https://js.arcgis.com/3.19/"></script>
<style>
html,
body,
#search {
display: block;
cursor: pointer;
margin: 5px;
}
</style>
<script>
require(["esri/map", "esri/geometry/Extent", "esri/tasks/GeometryService",
"dojo/dom", "dojo/on",
"esri/dijit/Search", "esri/layers/FeatureLayer", "esri/tasks/IdentifyTask", "esri/tasks/IdentifyParameters", "dojo/_base/array", "dojo/_base/array", "dojo/domReady!"
], function (Map, Extent,GeometryService, dom, on, Search, FeatureLayer, IdentifyTask, IdentifyParameters, arrayUtils, array) {
var lyrFields;
var URL = "http://maps/arcgis/rest/services/Address_Search_Test/MapServer/0";
var swURL = "http://maps/arcgis/rest/services/My_Services/MapServer";
var identifyTask = new IdentifyTask(swURL);
var identifyParams = new IdentifyParameters();
fl = new FeatureLayer(URL);
esriConfig.defaults.geometryService = new GeometryService("https://maps/arcgis/rest/services/Utilities/Geometry/GeometryServer");
var resultItems = [];
dom.byId("info").innerHTML = "Enter Address";
var map = new Map("Map", {
extent: new Extent({xmin:675912,ymin:886288,xmax:755209,ymax:1060473,spatialReference:{wkid:2223}}),
zoom: 0,
resize: false
});
map.addLayer(fl);
var search = new Search({
sources: [{
featureLayer: fl,
searchFields: ["site_address"],
displayField: "site_address",
exactMatch: false,
outFields: ["site_address"],
name: "Address",
maxResults: 1,
maxSuggestions: 20,
enableSuggestions: true,
minCharacters: 1,
}],
map: map,
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
search.startup();
map.on("load", mapReady);
function mapReady () {
search.on("select-result", executeIdentifyTask);
identifyParams.tolerance = 3;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [0, 1, 2];
//identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE;
identifyParams.spatialReference = 2223;
identifyParams.width = map.width;
identifyParams.height = map.height;
}
function executeIdentifyTask (event) {
search.set("value", search.selectedResult.name);
resultItems = [];
dom.byId("info").innerHTML = "";
event.result.feature;
identifyParams.geometry = event.result.feature.geometry;
identifyParams.mapExtent = map.extent;
var featureAttributes = event.result.feature.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
var deferred = identifyTask
.execute(identifyParams)
.addCallback(function (response){
return arrayUtils.map(response, function (result) {
var feature = result.feature;
var layerName = result.layerName;
feature.attributes.layerName = layerName;
if (layerName === 'Brush Collection') {
//alert(feature.attributes['Area']);
resultItems.push("<b>" + "Brush Area: " + "</b> " + feature.attributes['Area'] + "<br>");
}
else if (layerName === 'Refuse Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Refuse Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
else if (layerName === 'Recycling Collection') {
//alert(feature.attributes['Collection Day']);
resultItems.push("<b>" + "Recycling Collection Day: " + "</b> " + feature.attributes['Collection Day'] + "<br>");
}
//return feature;
dom.byId("info").innerHTML = resultItems.join("");
});
});
}
function getFldAlias(fieldName) {
var retVal = "";
console.info(fl);
array.some(fl.fields, function(item) {
if (item.name === fieldName) {
retVal = item.alias;
return true;
}
});
return retVal;
}
}
);
</script>
</head>
<p>Enter your address in the text box to get more details about your property for the form below:</p>
<div id="search" ></div>
<br />
</div>
<div id="Map" style="display: none;"></div>
<div id="info" style="margin: 5px; padding: 5px; background-color: #eeeeee;"></div>
<br />
... View more
03-09-2017
03:21 PM
|
0
|
2
|
4908
|
|
POST
|
I have a Signposts Feature Class with a related table of Signs. Both are editable via our ArcGIS Server Feature Services within an AGOL Web Map when brought in to Web AppBuilder. In the Signposts, I have a field that is a name, and I would like to add that to the related table as well and then concatenate it with a direction field once the user selects the direction from another field. I was thinking of doing this via an ArcSDE trigger in SQL, but ESRI said this is not supported and I couldn't get it to work anyhow. I know I can make some edits in the Edit Widget to add this capability, but I was wondering if any others had some inputs on other ways to accomplish this. Thanks, Mele
... View more
03-08-2017
03:47 PM
|
2
|
1
|
1514
|
|
POST
|
I have created a Trigger in SQL to update a field called asset_id. It does work, but I can't see the value until after I save the edit in ArcMap and stop editing. I am also wanting to see the new asset_id value in ArcGIS WebAppbuilder, but I don't see it until after I exit the app and reopen it. The Feature Class is versioned as in ArcSDE 10.2.2 on SQL Server 2014. I do not have the 'Save Edits to Base' option checked. Why am I not able to see the edits as soon as they are made on an Insert? CREATE TRIGGER [sde].[trg_insert_asset_id] ON [sde].[a98] AFTER INSERT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for trigger here DECLARE @id int --PRINT @ReturnValue UPDATE [dbo].[Sequences] SET next_id = next_id + 1 WHERE sequenceName = 'ASSETID' SET @id = (SELECT next_id FROM [dbo].[Sequences] WHERE sequenceName = 'ASSETID') UPDATE s SET Asset_ID = @id FROM preserve.sde.a98 s, inserted WHERE s.OBJECTID = inserted.OBJECTID END
... View more
03-06-2017
09:07 AM
|
0
|
0
|
1483
|
|
POST
|
Ryan, The way I resolved my issue was to add the related table to my web map. As far as the issue you are having, is it with editing? Can you add features or not? You may have to add a proxy on the machine hosting your local version of the Web AppBuilder application if you are using ArcGIS map server layers in your web map like we are. Mele
... View more
03-03-2017
09:11 AM
|
0
|
3
|
2071
|
|
POST
|
Thanks Robert, I swear I tried this yesterday but apparently I was missing something. I tried your code and it is working now, I will experiment further and mark this as the answer if this works for what I am trying to do. So far so good.
... View more
03-01-2017
06:56 AM
|
2
|
0
|
4302
|
|
POST
|
I am an trying to use map.on("load") but when I put it into my code, a blank map shows. Without it, the map displays just fine. I must be missing something simple here, but I can't find the issue. Thanks for any assistance in resolving this. Mele <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Search with Suggestion Template</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.19/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.19/esri/css/esri.css">
<style>
html,
body,
#map {
height: 90%;
width: 90%;
margin: 0;
padding: 0;
}
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
#LocateButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
</style>
<script src="https://js.arcgis.com/3.19/"></script>
<script>
require([
"esri/map", "esri/tasks/locator", "esri/dijit/Search", "esri/layers/FeatureLayer", "esri/InfoTemplate","esri/geometry/Extent", "esri/layers/ArcGISTiledMapServiceLayer","esri/dijit/LocateButton","dojo/_base/array", "dojo/dom", "esri/tasks/GeometryService", "esri/tasks/IdentifyTask", "esri/tasks/IdentifyParameters", "dojo/domReady!"
], function (Map, Locator, Search, FeatureLayer,InfoTemplate,Extent,ArcGISTiledMapServiceLayer,LocateButton, array, dom, GeometryService, IdentifyTask, IdentifyParameters)
{
var customBasemap = new ArcGISTiledMapServiceLayer("https://maps/arcgis/rest/services/Base_Map/MapServer");
var map = new Map("map", {
extent: new Extent({xmin:675912,ymin:886288,xmax:755209,ymax:1060473,spatialReference:{wkid:2223}}),
zoom: 0
});
map.on("load", alert("loaded"));
map.addLayer(customBasemap);
esriConfig.defaults.geometryService = new GeometryService("https://maps/arcgis/rest/services/Utilities/Geometry/GeometryServer");
var lyrFields;
var URL = "https://maps/arcgis/rest/services/Parcel_Information/MapServer/25"
fl = new FeatureLayer(URL);
var ParcelsURL = "https://maps/arcgis/rest/services/Parcel_Information/MapServer";
geoLocate = new LocateButton({
map: map
}, "LocateButton");
geoLocate.startup();
var search = new Search({
sources: [
{
featureLayer: fl,
searchFields: ["fulladdr"],
displayField: "fulladdr",
exactMatch: false,
outFields: ["parcel_code", "fulladdr", "lot_number", "subdiv_name"],
name: "Parcels",
placeholder: "3629 N Drinkwater",
maxResults: 10,
maxSuggestions: 10,
//Create an InfoTemplate and include three fields
infoTemplate: new InfoTemplate("Parcels", "Address: ${fulladdr}</br>APN: ${parcel_code}</br>Lot Number: ${lot_number}</br>Subdivision: ${subdiv_name}"),
enableSuggestions: true,
enableInfoWindow: false,
minCharacters: 0
},
],
map: map,
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
search.startup();
var selectionMade = search.on("select-result", selectionHandler);
function selectionHandler(evt){
var resultItems = [];
{
var featureAttributes = evt.result.feature.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
}
dom.byId("info").innerHTML = resultItems.join("");
}
function getFldAlias(fieldName) {
var retVal = "";
console.info(fl);
array.some(fl.fields, function(item) {
if (item.name === fieldName) {
retVal = item.alias;
return true;
}
});
return retVal;
}
});
</script>
</head>
<body>
<div id="LocateButton"></div>
<div id="search"></div>
<div id="map"></div>
</body>
<div id="info" style="margin: 5px; padding: 5px; background-color: #eeeeee;">
</html>
... View more
03-01-2017
05:21 AM
|
0
|
7
|
6849
|
|
POST
|
It was something simple that I was overlooking. I needed to add my related table to my AGOL web map. The related table is now editable in Web AppBuilder. Mele
... View more
02-27-2017
08:01 AM
|
0
|
0
|
2071
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-27-2026 09:23 AM | |
| 1 | 02-26-2026 06:47 AM | |
| 3 | 10-20-2025 05:21 AM | |
| 1 | 03-13-2015 04:39 PM | |
| 1 | 09-18-2025 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|