|
POST
|
Hello, I am trying to configure the smart data widget for a date field. I would like it set up so that when the user is filling out the data editor form, the date field will automatically fill with the current date/time. I went in the options for the widget and set the preset expression to the current date (shown in attachments). However, after saving and refreshing, the line is still shown as blank (also attachment shown). Any help to resolve this issue is appreciated! FYI- I am using WAB 2.14 Update- Asking again for assitance please! Marques
... View more
11-14-2019
10:11 AM
|
1
|
0
|
1173
|
|
POST
|
Hi Kelly, I would be highly interested in this if it is possible. To take editor tracking and somehow an arcade expression to populate a field when another field is updated. Can you assist with this? The workflow is: a feature class of countries and a user can update a particular attribute of that country. Would like it so that the date field is populated when that one attribute is updated/changed.
... View more
11-14-2019
08:23 AM
|
1
|
1
|
5917
|
|
POST
|
Is there a way to make it so that when a user wants to edit a date attribute for a selected feature, the current date automatically shows as a preset. I tried setting this in the attribute actions (preset) and smart actions tabs using an expression to have the date equal the current date but it keeps showing what is already in the attribute (previous dates). Another option is to make it so the user is forced to change a particular attribute in the form. Any help is greatly appreciated!
... View more
11-13-2019
09:43 AM
|
0
|
6
|
3639
|
|
POST
|
Hello, I uploaded a feature service and I am trying to update the feature hosted service by adding time. When I try to update the time, I get a error dialog box below. Can someone tell me what this means?
... View more
09-23-2019
09:05 AM
|
0
|
0
|
452
|
|
POST
|
Thank you for helping! I am still trying to figure out the rest. However, now the feature pop-up on the top right does not disappear and is covering up some of the points to the northeast.
... View more
07-19-2019
05:52 AM
|
0
|
1
|
3255
|
|
POST
|
Here is the code below in full. I am not sure how to copy/paste with the line numbers on the side like in other posts, so sorry if it looks confusing. Would the click event go in the mainView.WhenLayerView function? <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" /> <title>{PROTOTYPE} Passport Agency Map - JavaScript 4.12</title> <!--reference the JavaScript 4.12--> <link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/themes/light/main.css"/> <script src="https://js.arcgis.com/4.12/"></script> <style> html, body, #mainviewDiv { padding: 0; margin: 0; height: 100%; width: 100%; } #hiViewDiv { padding: 0; margin: 0; height: 135px; width: 200px; background-color: rgba(255, 255, 255, 0.9); border-style: solid; } #prViewDiv{ padding: 0; margin: 0; height: 135px; width: 200px; background-color: rgba(255, 255, 255, 0.9); border-style: solid; } /*Style for feature hover */ .esri-feature { letter-spacing: 0em; line-height: 1.55rem; font-feature-settings: "liga" 1, "calt" 0; background: #fff; padding: 1em; } </style> <script> require([ "esri/Map", "esri/widgets/Home", "esri/widgets/BasemapToggle", "esri/layers/FeatureLayer", "esri/views/MapView", "esri/widgets/Feature", "esri/widgets/Track", "esri/Graphic" ], function(Map, Home, BasemapToggle, FeatureLayer, MapView, Feature, Track, Graphic) { var fLayer = new FeatureLayer({ portalItem: { id: "5710089ef1374c6d939ebee954c8b15c" //Portal ID number }, popupTemplate: { title: "{Name}", content: [ { type: "fields", fieldInfos: [ { fieldName: "Status" }, { fieldName: "Address2", label: "Address" }, { fieldName: "Link", label: "Visit Main Page" }, { fieldName: "Directions", label: "Get Directions" } ] } ] } }); var map = new Map({ basemap: "streets-navigation-vector", layers: [fLayer] }); //Contiguous USA Main Map var mainView = new MapView({ container: "mainviewDiv", map: map, extent: { spatialReference: { latestWkid: 3857, wkid: 102100 }, xmin: -14513000, //bounding box for the inital load of the application ymin: 2887000, xmax: -7390000, ymax: 6326000 }, constraints: { minScale: 39911104 //user cannot zoom out past this scale } }); // Hawaii inset map var hiView = new MapView({ container: "hiViewDiv", map: map, extent: { xmin: -17834000, ymin: 2111000, xmax: -17173000, ymax: 2573000, spatialReference: { wkid: 102100 } }, spatialReference: { wkid: 102100 }, ui: { components: [] } }); mainView.ui.add("hiViewDiv", "bottom-left"); // Puerto Rico inset map var prView = new MapView({ container: "prViewDiv", map: map, extent: { xmin: -7887000, ymin: 1924000, xmax: -6957000, ymax: 2257000, spatialReference: { wkid: 102100 } }, spatialReference: { wkid: 102100 }, ui: { components: [] } }); mainView.ui.add("prViewDiv", "bottom-right"); //adding a home button var homeBtn = new Home({ view: mainView }); // end of Home Button mainView.ui.add(homeBtn, "top-left"); //adding a home button to the top left under the zoom in/out var toggle = new BasemapToggle ({ view: mainView, nextBasemap: "satellite" }); //end of BasemapToggle mainView.ui.add(toggle, "top-left"); //adding basemap toggle to the top right mainView.when().then(function() { // Create a default graphic for when the application starts var graphic = { popupTemplate: { content: "Mouse over passport icons to show details..." } }; // Provide graphic to a new instance of a Feature widget var feature = new Feature({ graphic: graphic, map: mainView.map, spatialReference: mainView.spatialReference }); mainView.ui.add(feature, "top-right"); //adding feature hover widget to top right mainView.whenLayerView(fLayer).then(function(layerView) { let highlight; // listen for the pointer-move event on the View mainView.on("pointer-move", function(event) { // Perform a hitTest on the View mainView.hitTest(event).then(function(event) { // Make sure graphic has a popupTemplate let results = event.results.filter(function(result) { return result.graphic.layer.popupTemplate; }); let result = results[0]; highlight && highlight.remove(); // Update the graphic of the Feature widget // on pointer-move with the result if (result) { feature.graphic = result.graphic; highlight = layerView.highlight(result.graphic); } else { feature.graphic = graphic; } }); }); ///enabling feature hover for Hawaii inset map hiView.on("pointer-move", function(event) { // Perform a hitTest on the View hiView.hitTest(event).then(function(event) { // Make sure graphic has a popupTemplate let results = event.results.filter(function(result) { return result.graphic.layer.popupTemplate; }); let result = results[0]; highlight && highlight.remove(); // Update the graphic of the Feature widget // on pointer-move with the result if (result) { feature.graphic = result.graphic; highlight = layerView.highlight(result.graphic); } else { feature.graphic = graphic; } }); }); // end hawaii feature hover ///enabling feature hover for puerto rico inset map prView.on("pointer-move", function(event) { // Perform a hitTest on the View prView.hitTest(event).then(function(event) { // Make sure graphic has a popupTemplate let results = event.results.filter(function(result) { return result.graphic.layer.popupTemplate; }); let result = results[0]; highlight && highlight.remove(); // Update the graphic of the Feature widget // on pointer-move with the result if (result) { feature.graphic = result.graphic; highlight = layerView.highlight(result.graphic); } else { feature.graphic = graphic; } }); }); // end puerto rico feature hover }); }); // end of view.when function }); // end of Main function </script> </head> <body> <div id="mainviewDiv" class="esri-widget"></div> <div id="hiViewDiv" class="esri-widget"></div> <div id="prViewDiv" class="esri-widget"></div> </body> </html>
... View more
07-17-2019
09:25 AM
|
0
|
0
|
3255
|
|
POST
|
The pop-up works and I can access the external website if I click on the icon and then click on the link within the pop-up. I would like to skip the pop-up altogether and when I click on the icon, it goes straight to the external website. I have a feature hover for accessing the info in the pop-up. Hope that helps.
... View more
07-17-2019
08:39 AM
|
0
|
2
|
3255
|
|
POST
|
thanks so much! I thought there had to be some type of code to write.
... View more
07-17-2019
08:20 AM
|
0
|
0
|
1021
|
|
POST
|
Is there a way that I can set the initial visibility of a layer on the layerlist widget to off when the application loads? Then the user can choose to turn the layer on, if needed. I am in the configs LayerList json file. I believe that is where the adjustment is made but I am not exactly sure what to put. Any help is greatly appreciated! Thanks!
... View more
07-17-2019
05:09 AM
|
0
|
2
|
1144
|
|
POST
|
I am creating an application using JP 4.12 and I would like for the application to point to an URL within the attribute table of a feature layer when a user clicks on a point feature. I came across the following post and I tried the following code but it does not seem to work. //Code for the specific URL to open in a new window featureLayer.on('click',function(e){ var specific = e.graphic.attributes['SpecificAttribute'] window.open("http://YourUrl.com/"+specific); }); In the SpecificAttribute, I have placed the name of the field that contains the URLs. //Code for the specific URL to open in a new window featureLayer.on('click',function(e){ var specific = e.graphic.attributes['Link'] window.open(specific); }); Any help would be greatly appreciated!
... View more
07-16-2019
07:36 AM
|
0
|
7
|
3554
|
|
POST
|
I am trying this code for point features I have in an application I am building with JS 4.12. //Code for the specific URL to open in a new window featureLayer.on('click',function(e){ var specific = e.graphic.attributes['SpecificAttribute'] window.open("http://YourUrl.com/"+specific); }); How would this code work for a feature layer where the link is in the attribute field. I have it in a field called Link. Right now I have it shown below but it is not working. //Code for the specific URL to open in a new window featureLayer.on('click',function(e){ var specific = e.graphic.attributes['Link'] window.open(specific); });
... View more
07-16-2019
05:58 AM
|
0
|
0
|
1046
|
|
POST
|
Yes this helps! I think I was putting the action on the map itself, thinking it would work. It now works perfectly!
... View more
06-20-2019
04:50 AM
|
1
|
0
|
1650
|
|
POST
|
Hello, I would like to know how it's possible if I am to select a feature on a map, the other charts, indicators, etc update. Right now I have it so when I click on an item in a list, it will zoom to that feature, highlight and charts update. I would like to have it the other way around as well.
... View more
06-19-2019
10:44 AM
|
0
|
2
|
1730
|
|
POST
|
I definitely will! My next step will be to add some interactive charts
... View more
06-18-2019
02:14 PM
|
0
|
0
|
484
|
|
POST
|
perfect! I already played around with it to see what I can do and it works!
... View more
06-18-2019
01:41 PM
|
1
|
2
|
484
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-14-2019 08:23 AM | |
| 1 | 11-14-2019 10:11 AM | |
| 2 | 06-09-2020 06:22 AM | |
| 1 | 12-04-2019 11:53 AM | |
| 7 | 04-29-2019 07:26 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-01-2022
09:16 AM
|