POST
|
Thank you very much. moment.js was just the ticket. This is how I used it: function formatDate(value) { var inputDate = new Date(value); return moment.utc(inputDate).format("M/D/YYYY"); } function formatTime(value) { var inputDate = new Date(value); return moment.utc(inputDate).format('hh:mm a'); } This forces it to display the date and time as it is in the attribute field.
... View more
12-12-2014
01:17 PM
|
0
|
0
|
668
|
POST
|
OK, if nobody knows how to do this then is there another way to format attribute date and time fields when using dojox/grid/DataGrid? Thanks in advance/
... View more
12-09-2014
03:15 PM
|
0
|
0
|
668
|
POST
|
Hope someone can help me. My web page is displaying data from a related table using dojox/grid/DataGrid. I found a format script that formats it as an actual date and time: //format the date and time that is used in the related table function formatDate(value) { var inputDate = new Date(value); return dojo.date.locale.format(inputDate, { selector: 'date', datePattern: 'MM/dd/yyyy' }); } function formatTime(value) { var inputDate = new Date(value); return dojo.date.locale.format(inputDate, { selector: 'time', timePattern: 'hh:mm a' }); } In my table I call it like this: <th width="100" field="StatusDate" formatter="formatDate"><em>Date</em></th> <th width="100" field="StatusTime" formatter="formatTime"><em>Time</em></th> This works to get a readable date and time but it assumes it is UTC and the browser converts it to Mountain Standard Time (I am in Arizona). Is there a way to prevent this so that it displays the date and time as they are in the attribute fields? Thanks Gwynn
... View more
12-05-2014
07:24 AM
|
0
|
4
|
4172
|
POST
|
You are correct. The authentication was not being triggered. Now it works!!! Thanks.
... View more
11-26-2014
06:34 AM
|
0
|
0
|
460
|
POST
|
OK I changed it to the following and now my map layer will not display. What have I got wrong? function findRelatedRecords(evt) { var features = evt.features; var relatedTopsQuery = new RelationshipQuery(); relatedTopsQuery.outFields = ["*"]; relatedTopsQuery.relationshipId = 0; relatedTopsQuery.objectIds = [features[0].attributes.OBJECTID]; buildingFeatureLayer.queryRelatedFeatures(relatedTopsQuery, function(relatedRecords) { console.log("related recs: ", relatedRecords); if ( ! relatedRecords.hasOwnProperty(features[0].attributes.OBJECTID) ) { console.log("No related records for Building: ", features[0].attributes.OBJECTID); return; } var fset = relatedRecords[features[0].attributes.OBJECTID]; var items = array.map(fset.features, function(feature) { return feature.attributes; }); //Create data object to be used in store var data = { identifier: "OBJECTID", //This field needs to have unique values label: "Building", //Name field for display. Not pertinent to a grid but may be used elsewhere. items: items }; //Create data store and bind to grid. store = new ItemFileReadStore({ data:data }); grid.setStore(store); grid.setQuery({ OBJECTID: "*" }); }); } Thanks
... View more
11-26-2014
06:12 AM
|
0
|
2
|
460
|
POST
|
I am modifying the sample code from: https://developers.arcgis.com/javascript/jssamples/fl_query_related.html and I don't understand how to configure the section: function findRelatedRecords(evt) { var features = evt.features; var relatedTopsQuery = new RelationshipQuery(); relatedTopsQuery.outFields = ["*"]; relatedTopsQuery.relationshipId = 0; relatedTopsQuery.objectIds = [features[0].attributes.BUILDING_PK]; buildingFeatureLayer.queryRelatedFeatures(relatedTopsQuery, function(relatedRecords) { console.log("related recs: ", relatedRecords); if ( ! relatedRecords.hasOwnProperty(features[0].attributes.BUILDING_PK) ) { console.log("No related records for Building: ", features[0].attributes.BUILDING_PK); return; } var fset = relatedRecords[features[0].attributes.BUILDING_PK]; var items = array.map(fset.features, function(feature) { return feature.attributes; }); //Create data object to be used in store var data = { identifier: "BUILDING_PK", //This field needs to have unique values label: "Building", //Name field for display. Not pertinent to a grid but may be used elsewhere. items: items }; //Create data store and bind to grid. store = new ItemFileReadStore({ data:data }); grid.setStore(store); grid.setQuery({ BUILDING_PK: "*" }); }); } How do I indicate the related fields? The service is restricted access and requires authentication. The relationships for this layer are as follows: Relationships: tbl_BuildingStatus (0) -- Related To: tbl_BuildingStatus (9) tbl_Events (1) -- Related To: tbl_Events (8) Thanks Gwynn
... View more
11-26-2014
05:08 AM
|
0
|
4
|
1567
|
POST
|
Is there any way to install HazUS on a computer running ArcMap 10.2.2? We need to start using HazUS but are running version 10.2.2. Is there any way to install HazUS? Thanks Gwynn
... View more
08-28-2014
11:01 AM
|
0
|
2
|
5258
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|