|
POST
|
Thanks Robert for the sample. It helps, but what I was trying to do was get the AutoComplete in the Search widget to work without a map and pass the results of the search to a Query Task or use the Out fields from the Search widget. I would appreciate any assistance with this. Thanks <!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>Query State Info without Map</title>
<script src="https://js.arcgis.com/3.18/"></script>
<style>
html,
body,
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
</style>
<script>
require([
"dojo/dom", "dojo/on",
"esri/tasks/query", "esri/tasks/QueryTask", "esri/dijit/Search","esri/InfoTemplate", "esri/layers/FeatureLayer", "dojo/domReady!"
], function (dom, on, Query, QueryTask, Search, InfoTemplate, FeatureLayer) {
var queryTask = new QueryTask("URL to Feature Server");
var query = new Query();
query.returnGeometry = false;
query.outFields = [
"fulladdr", "parcel_code", "subdiv_name", "lot_number"
];
on(dom.byId("execute"), "click", execute);
var search = new Search({
sources: [{
featureLayer: new FeatureLayer("URL to Feature Server"),
searchFields: ["fulladdr"],
displayField: "fulladdr",
exactMatch: false,
outFields: ["parcel_code", "fulladdr"],
name: "Parcels",
maxResults: 10,
maxSuggestions: 20,
//Create an InfoTemplate and include three fields
//infoTemplate: new InfoTemplate("Parcels", "Address: ${fulladdr}"),
enableSuggestions: true,
minCharacters: 0
}],
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
function execute () {
query.text = dom.byId("search").value;
queryTask.execute(query, showResults);
}
function showResults (results) {
var resultItems = [];
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features[i].attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
</script>
</head>
<body>
<div id="search" ></div>
<input id="execute" type="button" value="Get Details">
<br />
<br />
<div id="info" style="padding:5px; margin:5px; background-color:#eee;">
</div>
</body>
</html>
... View more
11-01-2016
04:53 PM
|
0
|
6
|
3418
|
|
POST
|
I am using the QueryTask and would like to use the Alias in the results rather than the field names. The documentation sounds like I can do this https://developers.arcgis.com/javascript/3/jshelp/intro_querytask.html You must use the actual field names rather than the alias names, but you can use the alias names later when you display the results. but I could not find an example for doing this programmatically. Can someone provide an example of using the Alias Names rather than the Field names in the results from the Query Task? Thanks, Mele
... View more
11-01-2016
04:32 PM
|
0
|
2
|
2554
|
|
POST
|
I have created a simple query task using this sample: https://developers.arcgis.com/javascript/3/jssamples/query_nomap.html I would like to be able to use the Pagination in our ArcGIS Server 10.3.1 Map services. I have been able to use pagination with the Search Widget in a map, but would like to use the same type of auto complete without a map and return certain fields. I have been trying to combine the search widget and a query task without much success. Does anyone have a sample of doing this? Thanks, Mele
... View more
10-27-2016
11:04 AM
|
0
|
8
|
4978
|
|
POST
|
I am currently using the Editor Widget and the Attribute Inspector to allow users to add new features and then update the attributes with the Attribute Inspector. We have a request to expand the functionality so that users can edit and add features to a related table. In our use case, we have Sign posts as a point layer and we would like to add the signs associated to the Sign Post to a related table. Is this possible to edit the related records using Attribute Inspector, including adding new records to the table? Does anyone have some examples of doing this? Thanks, Mele
... View more
09-09-2016
04:30 PM
|
0
|
0
|
1643
|
|
IDEA
|
I had submitted the issue with Feature Service field order as a Bug if anyone wants to add their name to this to raiser the severity. #BUG-000090535 [Enhancement] Feature Service Fields List Order is not maintained on REST As far as the Feature Class field order, sometimes we may add a field that is related to other fields and it would be nice if it were in logical order in the GDB schema rather than having to move it around in the MXD. For instance, if we add a "Unit_Number" field it would be nice to put it after the other address fields in the database. Mele
... View more
07-08-2016
09:31 AM
|
0
|
0
|
2335
|
|
POST
|
Is it possible to open the legend by default when someone opens an ArcGISOnline Web Mapping Application? I am using the Basic Viewer but did not see how I could open this by default. Thanks, Mele
... View more
07-04-2016
01:30 PM
|
0
|
2
|
2806
|
|
POST
|
I would like to be able to send the coordinates from a feature to Google for Directions/Street View - Can this be done via the Popup configuration? I know how to hyperlink with the popup, but don't know how to get the coordinates. If so, can someone share an example? Thanks Mele
... View more
07-04-2016
01:28 PM
|
0
|
1
|
2291
|
|
POST
|
Thanks for the samples! This looks like I was looking for. I like that it is in C# too. I will work with it this week.
... View more
05-30-2016
08:40 AM
|
0
|
0
|
9745
|
|
POST
|
Adrian, Thanks for the reply. I am looking for the data source of our organization's map services that are hosted on our internal ArcGIS Server not those on AGOL. Mele
... View more
05-25-2016
08:31 AM
|
0
|
0
|
9745
|
|
POST
|
I am looking for some programmatic way to get the underlying data source used for a Map Service Layer. We use mostly SDE layers, so I would like the Feature Class Name. I was able to do this with ArcObjects with C# .NET prior to 10.1 but I don't believe it can be done the same way due to the changes in ArcGIS Server architecture Does anyone have any code examples of getting the layer sources? I may end up using the MXD to compile data sources, but would like to go against the map services directly if possible. Thanks, Mele
... View more
05-24-2016
03:47 PM
|
0
|
16
|
20073
|
|
POST
|
We are upgrading our ArcGIS server 10.2.2 to 10.3.1. We have two SOEs that are needed once we upgrade. I am trying to ensure that there will be no issues when I upgrade. According to ESRI I only need to remove the SOEs prior to the upgrade and then add them back after the upgrade. My question is do I need to upgrade the ArcObjects SDK prior to upgrading the ArcGIS Server installation and adding the SOEs back? The SOE uses the SOESupport assembly which I believe comes from the SDK and that is why I was wondering if the SDK needed to be upgraded. I am assuming that because my SOE is currently working in 10.2.2 that .NET 3.5 SP1 is installed, correct? Thanks for any input. Mele
... View more
04-10-2016
10:16 AM
|
0
|
1
|
5298
|
|
POST
|
Joshua, Thanks for the explanation and suggestion. That makes perfect sense. You are correct that the assetid on the posts is unique but once joined to the signs table it is not longer unique. I added the Query Layer again to ArcMap and this time let ArcMap figure out the Unique Identifier(s) to use and now I am seeing the number of records I had expected. Thanks, Mele
... View more
04-03-2016
12:09 PM
|
0
|
0
|
5004
|
|
POST
|
Joshua, This is query I am using. SELECT S.[AssetReferenceId] ,S.[AssetTypeId] ,S.[Name] ,S.[Description] ,S.[AssetId] ,S.[IntersectionNumber] ,S.[SignTypeId] ,S.[SignOrientationId] ,P.Shape FROM [STREETOPSWORKORDERDBSVR].[StreetOps].[gis].[SignsGISMapping] S LEFT JOIN StreetOps.sde.TRF_Signposts_VW P ON S.AssetID = P.asset_id I use the AssetID field as the Unique Identifier. The AssetId field is a int data type. I also have some Query Layers where I use the ObjectID of the feature class as a unique identifier and I see the same behavior with the counts between SQL Server Management Studio and ArcMap. I did see a similar thread that involved Oracle. Maybe it is something for Support to address. Thanks, Mele
... View more
03-29-2016
09:35 AM
|
0
|
1
|
5004
|
|
POST
|
I created a query in SQL Server Management studio using a SQL Server ArcSDE multi-version view joined to another SQL table. I am joining a signs SQL table to our sign posts feature class. We have more signs than signposts so I am using a Left Join to get the SQL Geometry of the Sign Post feature class and assigning it to the joined sign. When I run the query SQL in management studio, I see about 45,000 records returned. When I take that same SQL statement and create a Query Layer from it, the number or records in the Query Layer's attribute table is about 29,000. If I than export the Query Layer to a shapefile, the number of records exported matches exactly the roughly 45,000 I expected to see. I have seen these types of discrepancies in counts before with SQL Query Layers when used in ArcMap. What is the cause of this issue? It makes it hard to trust what is shown in ArcMap when view the Query Layer directly. Thanks, Mele
... View more
03-26-2016
02:52 PM
|
0
|
8
|
9020
|
| 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 |
2 weeks ago
|