POST
|
I don't see any fieldInfos set in your layerInfoss object, but all fields should be returned anyways. This table is editable, correct? It may be an issue with the recordTemplate - title property being {PROPERTY_ID}. Do you have that field in your table? If not, change it to a field name from your table. You may want to try moving line 36 "activityRecord.selectFeatures(..." under the AttributeInspector constructor at line 48. I use Chrome for console logging. Set some objects in console.log and look to see if they are holding the expected values. Welcome to the "combinations" club! Kyle
... View more
08-14-2014
10:26 AM
|
0
|
0
|
1128
|
POST
|
Unfortunately, I don't have a live website to show anymore and the original feature services have been relieved of duty. Essentially, query2 is querying the attribute of the selected feature in the "related" table (activityRecord in my case). You may have success with something like: query2.where = "serviceID = '" + selectedFeatures[0].attributes.serviceID + "'"; So long as you have the serviceID attribute present in both the feature layer and table it should come back with results. Then identify the "featureLayer" property as "activityRecord' for the "layerInfos" object, and specify "layerInfos" in "attInspector" for the "layerInfos" property. I believe it should then hydrate the Inspector with the query2 results. If I get some time this weekend maybe I'll spin up some services for an example. In the mean time, let me know if there's more clarity I can provide. Kyle
... View more
08-14-2014
06:18 AM
|
0
|
2
|
1128
|
POST
|
Hi William, I had attempted this almost 2 years ago (v 2.7) with no success using RelationshipQuery. After several discussions with Support, I was told it couldn't be done and would be logged as NIM081851. Here's what ended up working for me. https://community.esri.com/message/253305#253305 I hope it helps you out. Kyle
... View more
08-13-2014
03:16 PM
|
1
|
4
|
1128
|
POST
|
Chris, Should your geocoder DOMNode parameter be "panelSearch" or "panelGeocoder" instead of "search"?
... View more
08-12-2014
07:54 AM
|
0
|
2
|
626
|
POST
|
My caveat here is that I went through a great many permutations trying to figure it out. Ultimately, Esri support told me it couldn't be done using FeatureLayer::queryRelatedFeatures and gave it an enhancement/bug ID of NIM081851, but looking for it now I can't find it. Anyways, I ended up using a query to first select a feature with a mouse click. Second, select the features (records) from the related table using the ID of the clicked feature. I made the AttributeInspector element show up in a content pane instead of the popup too. I hope this helps. B
layerInfos = [{ 'featureLayer': activityRecord,
'showAttachments': true,
'isEditable': true,
'fieldInfos': [
{ 'fieldName': 'FIELD', 'isEditable': true, 'label': 'Record:' }
]
}];
attInspector = new esri.dijit.AttributeInspector(
{ layerInfos: layerInfos },
"inspectorDiv"
);
recordTemplate = new esri.dijit.PopupTemplate({
title: "{PROPERTY_ID}",
fieldInfos: [
{ fieldName: "RECORD FIELD", visible: true, label: "Record:" }
],showAttachments: true
});
activityRecord = new esri.layers.FeatureLayer("REST ENDPOINT OF RELATED TABLE", {
infoTemplate: recordTemplate,
outFields: ["*"],
id: "activityRecord"
});
query2 = new esri.tasks.Query();
query2.where = "DESTINATION FIELD OF RELATIONSHIP = '" + PRIMARY KEY OF SELECTED FEATURE + "'";
query2.outFields = ["*"];
activityRecord.selectFeatures(query2, esri.layers.FeatureLayer.SELECTION_NEW);
... View more
09-22-2012
12:43 PM
|
0
|
0
|
422
|
POST
|
Steve, Here's the Mode property page from the customizing help in ArcPad 10. [ATTACH=CONFIG]14292[/ATTACH]
... View more
05-13-2012
06:12 PM
|
0
|
0
|
203
|
POST
|
Take a look at the Customizing ArcPad Help file under the ArcPad programs folder, i.e. "C:\Program Files (x86)\ArcGIS\ArcPad10.0\Developer\Help\ArcPadStudio.chm". In the contents tab, locate "ArcPad Object Model Reference", then "Form Object", and Mode property. Is that what you're looking for? Hope this helps, Kyle
... View more
05-12-2012
06:11 AM
|
0
|
0
|
203
|
POST
|
Here's the workflow: A user selects a feature layer polygon, views a popup. A link added to the popup will run a RelationshipQuery to view related records. How can I get the RelationshipQuery results to update the first popup as an AttributeInspector? A second link on the first popup would run a function to add a new record to the related table, that would also need to appear as an AttributeInspector in the first popup. I don't think I'm handling the RelationshipQuery results correctly because the second popup comes back with 'no features selected'. I've run the Query Related Records on the REST feature service so I know the relationship is established. Thanks much for any input B dojo.require("dijit.form.Button");
dojo.require("dijit.Toolbar");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.TitlePane");
dojo.require("esri.map");
dojo.require("esri.toolbars.navigation");
dojo.require("esri.dijit.BasemapGallery");
dojo.require("esri.arcgis.utils");
dojo.require("esri.dijit.Popup");
dojo.require("esri.dijit.AttributeInspector-all");
var popup, popupTemplate;
var startExtent;
var map;
var gallerymaps = [];
var featureLayer, basemapGallery, HybridLayer, ImageryLayer, BasemapLayer, operationalLayer;
var HybridBasemap, ImageryBasemap, BasemapBasemap;
var selectionHandler;
var query,relatedQuery;
var deferred = [];
var viewLink, newLink;
function init() {
esri.config.defaults.map.sliderLabel = null;
popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
new dojo.Color([0, 0, 255]), 2), new dojo.Color([0, 0, 255, 0.25]))
}, dojo.create("div"));
startExtent = new esri.geometry.Extent(...);
map = new esri.Map("map", {
extent: startExtent,
infoWindow: popup
});
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
dojo.connect(map, "onClick", function (evt) {
query = new esri.tasks.Query();
query.geometry = evt.mapPoint;
deferred.push(featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW));
map.infoWindow.setFeatures(deferred);
map.infoWindow.show(evt.mapPoint);
map.infoWindow.resize(325, 210);
});
relatedQuery = new esri.tasks.RelationshipQuery();
relatedQuery.outFields = ["*"];
relatedQuery.returnGeometry = false;
relatedQuery.relationshipId = 0;
// Add links into the InfoWindow Actions panel
viewLink = dojo.create("a", {
"class": "action",
"innerHTML": "View Activity",
"href": "javascript:void(0);"
}, dojo.query(".actionList", map.infoWindow.domNode)[0]);
newLink = dojo.create("a", {
"class": "action",
"innerHTML": "Add Activity",
"href": "javascript:void(0);"
}, dojo.query(".actionList", map.infoWindow.domNode)[0]);
// Register a function to be called when the user clicks on the link
dojo.connect(viewLink, "onclick", function (evt) {
var feature = map.infoWindow.getSelectedFeature();
exeViewRelated(feature);
});
dojo.connect(newLink, "onclick", function (evt) {
var feature = map.infoWindow.getSelectedFeature();
exeAddRelated(feature);
});
dojo.connect(featureLayer, "onEditsComplete", function () {
featureLayer.refresh();
});
addFeatureLayer();
//working around an arcgis server feature service bug
esri.setRequestPreCallback(function (ioArgs) {
if (ioArgs.url.indexOf('queryRelatedRecords') !== -1) {
ioArgs.url = ioArgs.url.replace("FeatureServer", "MapServer");
}
return ioArgs;
});
return map;
}
function addFeatureLayer() {
//add the operational layer to the map
operationalLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://.../MapServer");
map.addLayer(operationalLayer);
popupTemplate = new esri.dijit.PopupTemplate({
title: "{PHYISICALADDRESS}",
fieldInfos: [
{ fieldName: "PARCELNO", visible: true, label: "Parcel Number:" },
{ fieldName: "OWNERNAME", visible: true, label: "Owner Name:" },
{ fieldName: "MAILADDRESS", visible: true, label: "Mailing Address:" },
{ fieldName: "MAILLOC", visible: true, label: "Mailing Location:" },
{ fieldName: "CONTACT_PHONE_NUMBER", visible: false, label: "Phone Number:" },
{ fieldName: "CONTACT_EMAIL", visible: false, label: "Email Address:" },
{ fieldName: "ACTIVITY_DESIGNATION", visible: false, label: "Designation:" },
{ fieldName: "ACTIVITY_DATE", visible: false, label: "Activity Date:" },
{ fieldName: "ACTIVITY_INFO", visible: false, label: "Activity Information:" },
{ fieldName: "ACTIVITY_CUSTODIAN", visible: false, label: "Information Custodian:" },
{ fieldName: "PROPERTY_LOC_DESC", visible: false, label: "Property Location Description:" }
],
showAttachments: true
});
featureLayer = new esri.layers.FeatureLayer("http://.../FeatureServer/0", {
mode: esri.layers.FeatureLayer.MODE_SELECTION,
infoTemplate: popupTemplate,
outFields: ["*"],
id: "propertyLayer"
});
map.addLayer(featureLayer);
}
function exeViewRelated(parcelFeature) {
relatedQuery.objectIds = [parcelFeature.attributes.OBJECTID];
featureLayer.queryRelatedFeatures(relatedQuery, function (relatedRecords) {
var fset = relatedRecords[parcelFeature.attributes.OBJECTID];
title = parcelFeature.attributes.PHYISICALADDRESS;
// content = "<b>Owner Name: </b>" + parcelFeature.attributes.OWNERNAME
// + "<br /><br /><b>Mailing Address: </b>" + parcelFeature.attributes.MAILADDRESS
// + "<br /><br /><b>Mailing Location: </b>" + parcelFeature.attributes.MAILLOC
var layerInfos = [{ 'featureLayer': featureLayer,
'showAttachments': true,
'isEditable': true,
'fieldInfos': [
{ 'fieldName': 'PHYISICALADDRESS', 'isEditable': false, 'label': 'Property Address:' },
{ 'fieldName': 'OWNERNAME', 'isEditable': false, 'label': 'Owner Name:' },
{ 'fieldName': 'MAILADDRESS', 'isEditable': false, 'label': 'Mailing Address:' },
{ 'fieldName': 'MAILLOC', 'isEditable': false, 'label': 'Mailing Location:' },
]
}];
var attInspector = new esri.dijit.AttributeInspector({
layerInfos: layerInfos
},
dojo.create("div")
);
dojo.place(attInspector.domNode, popup.domNode);
//add a save button next to the delete button
var saveButton = new dijit.form.Button({ label: "Save", "class": "saveButton" });
dojo.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after");
dojo.connect(saveButton, "onClick", function () {
updateFeature.getLayer().applyEdits(null, [updateFeature], null);
});
dojo.connect(attInspector, "onAttributeChange", function (feature, fieldName, newFieldValue) {
//store the updates to apply when the save button is clicked
updateFeature.attributes[fieldName] = newFieldValue;
});
dojo.connect(attInspector, "onNext", function (feature) {
updateFeature = feature;
console.log("Next " + updateFeature.attributes.objectid);
});
dojo.connect(attInspector, "onDelete", function (feature) {
feature.getLayer().applyEdits(null, null, [feature]);
map.infoWindow.hide();
});
dojo.connect(map.infoWindow, "onHide", function () {
featureLayer.clearSelection();
});
map.infoWindow.setTitle(title);
map.infoWindow.setContent(attInspector.domNode);
map.infoWindow.resize(500, 500);
});
}
... View more
04-14-2012
12:56 PM
|
0
|
2
|
1935
|
POST
|
I've found there's a good starting point in the Local Government Information Model. Look for the feature dataset called "FacilitiesStreets", within is a feature class called "Sign". It's for version 10. http://www.arcgis.com/home/item.html?id=b8905e21104342afbe830da28d11b2b9 I'm using this as a jumping off point for several projects that deal with the new MUTCD requirements. Hope this helps.
... View more
05-05-2011
07:11 AM
|
0
|
0
|
164
|
POST
|
Brad, Are you creating the project using an Add-In template? I spent a fair amount of time researching the same issue for the Add-In I was developing. Ultimately, I found that the <ArcMap> tag was missing from the 'Config.esriaddinx' file. Once I added this the build ran successfully. If you are using the Add-In template, try adding the following sample text (and modify for your add-in type) within the <Addin> tag of the 'Config.esriaddinx' file.
<ArcMap>
<Commands>
<Button
id="Acme_ToggleDockWinBtn"
class="ToggleDockWinBtn"
caption="OpenDockWin"
category="Acme Tools"
image="Images\ToggleDockWinBtn.png"
tip="Toggle dockable window."
message="Open dockable window.">
<Helpheading="Toggle">Turns the ACME dockable window on and off.</Help>
</Button>
</Commands>
</ArcMap>
Hope that helps. Kyle
... View more
04-14-2011
01:15 PM
|
1
|
0
|
450
|
POST
|
If I connect my handheld device (with ArcPad) to a VRS and capture real-time, do I need GPSCorrect? Thanks, Kyle
... View more
07-20-2010
11:20 AM
|
0
|
0
|
442
|
Title | Kudos | Posted |
---|---|---|
1 | 08-13-2014 03:16 PM | |
1 | 04-14-2011 01:15 PM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|