POST
|
Needed to add the outFields parameter set to return all fields. const template = {
"title": "Address: {Property_Address}",
"content": [{
type: "text",
outFields: ["*"],
text: "<ul><li><b>Description:</b> {CaseDesc}<br></li>"+
"<li><b>Status:</b> {CaseStatus}<br></li>"+
"<li><b>Date of Infraction:</b> {DateOfInfraction}<br></li>"+
"<li><b>Inspector:</b> {InspectorFullName}<br></li>"+
"<li><b>Owner Name:</b> {Property_OwnerName}<br></li>"+
"<li><b>Legal Description</b> {Property_LegalDescription}<br></li>"+
"<li><b>Narrative</b> {Narrative}<br></li></ul>"
}],
actions: [openSphinxAction,openPaAction]
}; made a code pen with one of the examples. fiddle around with the popup template to see. https://codepen.io/BiiGreen/pen/poBbeEG
... View more
|
0
|
0
|
52
|
POST
|
I appreciate your help. Below is a picture of inspecting the results in chrome and showing that when a field that is in the data but not in the popup is referenced in the feature action, it comes back as 'undefined'. And the style tag isn't working. const popupCase = {
"title": "Address: {Property_Address}",
"content": [{
type: "text",
text: "<ul><li><b>Description:</b> {CaseDesc}<br></li>"+
"<li><b>Status:</b> {CaseStatus}<br></li>"+
"<li><b>Date of Infraction:</b> {DateOfInfraction}<br></li>"+
"<li><b>Inspector:</b> {InspectorFullName}<br></li>"+
"<li><b>Owner Name:</b> {Property_OwnerName}<br></li>"+
"<li><b>Legal Description</b> {Property_LegalDescription}<br></li>"+
"<li><b>Narrative</b> {Narrative}<br></li>"+
"<li><b>OriginalID:</b> {OriginalId}<br></li>"+
"<li style='display:none;'><b>OriginalID:</b> {OriginalId}<br></li>"+
"<li><b>Property Id:</b> {Property_PropertyId}</li></ul>"
}],
actions: [openSphinxAction,openPaAction]
}; This code gave the below result. The data is coming from an array out of an API and turned into graphics and then the graphics are turned into a feature layer. Perhaps that has something to do with the necessity of the attribute being in the popup to be accessed in the feature action function. Principal GIS Architech City of Port St Lucie, FL
... View more
a week ago
|
0
|
0
|
92
|
POST
|
The data needs to be in the popup to use with the popup feature action and open the link. function openPaLink(){
const paId = view.popup.selectedFeature.attributes.Property_PropertyId;
let url = 'https://www.******.gov/RECard/#/propCard/' + paId;
window.open(url, '', 'width=400, height=400');
} The style tag didn't work. I tried changing the color and display earlier with style and no luck. The browser shows "Uncaught SyntaxError: Unexpected identifier 'display' at ...." "<li><b>Legal Description</b> {Property_LegalDescription}<br></li>"+
"<li><b>Narrative</b> {Narrative}<br></li>"+
"<li style="display:none;"><b>OriginalID:</b> {OriginalId}<br></li>"+
"<li><b>Property Id:</b> {Property_PropertyId}</li></ul>"
... View more
a week ago
|
0
|
2
|
106
|
POST
|
This is what I did with my tiled aerials. They are hosted in AGOL. Not sure if it will help but... using 4.29 "esri/layers/TileLayer"
......
var latestAerialLayer = new TileLayer({
url: "https://tiles.arcgis.com/tiles//arcgis/rest/services/FDOT23_Aerials/MapServer",
id: "latestAerial",
visible: "true",
listMode: "hide-children"
});
... View more
a week ago
|
0
|
0
|
30
|
POST
|
Hi, I'm trying to see if there is a way to include data in a popup template but not have it show in the popup itself. The reason is that there are 2 fields that are needed to run the feature actions that are meaningless to the user. One is global id and the other is a long integer id. Both of these fields are used in feature actions to open up web pages based on the feature. Here is the popup code const popupCase = {
"title": "Address: {Property_Address}",
"content": [{
type: "text",
text: "<ul><li><b>Description:</b> {CaseDesc}<br></li>"+
"<li><b>Status:</b> {CaseStatus}<br></li>"+
"<li><b>Date of Infraction:</b> {DateOfInfraction}<br></li>"+
"<li><b>Inspector:</b> {InspectorFullName}<br></li>"+
"<li><b>Owner Name:</b> {Property_OwnerName}<br></li>"+
"<li><b>Legal Description</b> {Property_LegalDescription}<br></li>"+
"<li><b>Narrative</b> {Narrative}<br></li>"+
"<li><b>OriginalID:</b> {OriginalId}<br></li>"+
"<li><b>Property Id:<\b> {Property_PropertyId}</li></ul>"
}],
actions: [openSphinxAction,openPaAction]
}; Thanks!
... View more
a week ago
|
0
|
6
|
134
|
POST
|
My issue was the inconsistent field naming across the different items. In order for this to work, the search field name has to be used everywhere. My search field name was property and the key to the tables was siteid. The hosted table and the csv table had to have a field named siteid and property. In the choices spreadsheet, there had to be a row for the select_one property see choices.png In the survey row for the select_one property, the formula in the appearance column is below autocomplete search('property?url=https://services1.arcgis.com/*/arcgis/rest/services/PropertyTables/FeatureServer/3','matches','site',${siteid}) the table parameter in the search function has to start with property as well. to get the same result from the csv file autocomplete search('PropSched','matches','site',${siteid}) And thanks to Tyler for pointing out my rogue apostrophe. 🙂
... View more
3 weeks ago
|
0
|
0
|
89
|
POST
|
I'm trying to populate a select_multiple field list from a feature service I have a feature service of polygons with a "siteid" field. User clicks on map and the location is used to spatially query the feature service and return the "siteid" for the polygon. No problem with a script. From this siteid, I want to select all assets that are associated with the siteid from a hosted feature table and return a description of the asset. Then, when an asset description is selected, I need to return the asset id for that asset and store in hidden field. I've put the data in a csv file in the survey123 linked content and tried the below and nothing is returned. autocomplete search('PropSched','matches','site','${siteid}) I've also tried to do the search using the hosted table like below and nothing is returned. autocomplete search('prop?url=https://services1.arcgis.com/********/arcgis/rest/services/Property_Tables/FeatureServer/3','matches','site','${siteid}) I am able to use a script to return all the assets for a site in json and could format that as needed. But, don't know how to use that to populate the select_multiple. No idea where I'm going wrong and I've spent way too much time on this. Any help would be greatly appreciated.
... View more
3 weeks ago
|
0
|
3
|
312
|
POST
|
Thank you I was having issues with a very simple join between a feature class and table in a FGDB. Nothing that I did, no matter where the data was located or stored, ever worked. I made sure that the "Index Joined Field" box and the "Rebuild Join Field Indexes" were both checked, and the Join worked. Running ArcPro 3.2.2
... View more
4 weeks ago
|
0
|
0
|
140
|
POST
|
Hi, I have a strange problem. We are moving all the services located on our local arcgis server to arcgis online. I'm trying to update an in-house form application that uses these services. When I publish the same data to arcgis online, the find.find comes back with an error shown in the attached RejectedPromise.png image. // The find() performs a LIKE SQL query based on the provided text value
// showResults() is called once the promise returned here resolves
find.find(findUrl, params).then(showResults).catch(rejectedPromise); The app was running in 4.7 for several years, until we started moving to agol. When I called tech support this morning, they told me to update it to 4.28 and see what happens. Anyway, i took their find sample on the sdk site: Developers Find Sample I edited it to use local services and hosted services by commenting out a line. // Create a URL pointing to a map service
const findUrl = "https://services1.arcgis.com/*********/arcgis/rest/services/Partest/FeatureServer";
//const findUrl = "https://***********/rest/services/RealEstate/Parcels/MapServer";
// Set parameters to only query the Counties layer by name
const params = new FindParameters({
layerIds: [0],
searchFields: ["PARCELID"]
}); The exact same data in a local service works while the hosted service bombs. I tried it with other services we are moving like addresses and it's the same thing. I even modified the find example to work with our garbage collection hosted service that has always been hosted published right from Pro and it's the same thing. The only difference is the type of service, Feature Server or Map Server. Their find example uses a Map Service. I will call support tomorrow and show them the testing app I made and see what happens. Does anyone have any information that might help me find a resolution. Thanks in advance, Michael
... View more
01-17-2024
12:46 PM
|
0
|
1
|
259
|
POST
|
Hello again! we are moving all our content to AGOL and losing our local servers in an effort to reduce costs, maintenance and increase security associated with on prem servers. I'm losing my local ArcGIS Server which holds secured feature services that are accessed by various applications. Besides not being able to use our printing and geoprocessing services from our AGS, we are losing the security features provided by our local AGS. We have feature services that are accessed through javascript apps via a proxy. Now that we are losing the security model offered by AGS, how can we replicate this with a hosted feature service. We've implemented the oauth option that requires users to sign in and that works for the services that have minimal users with AGOL logins. The problem arises when we have a service used by multiple departments and multiple users in each department and the users can and do change frequently. Acquiring licenses for this is cost prohibitive and definitely not what anyone wants to do. Is there anyway to allow access to this secured service without having a user login?
... View more
10-31-2023
08:17 AM
|
0
|
1
|
188
|
POST
|
Hi, Trying to link to an ArcGIS Online WebAppBuilder app. I know this is the standalone developer section but it should likely be the same. I want to query for a feature and set the scale. The parameters work individually but when put together, only the query parameter seems to be used. https://pslgis.maps.arcgis.com/apps/webappviewer/index.html?id=954ca00870d54fd780f4388e32662ae6&scale=1500&query=PZWEB_2771,PROJNO,P22-253 This parameter by itself works. The &scale=1500 works by itself. &query=PZWEB_2771,PROJNO,P22-253 Is this possible or, as usual, am I missing something. Thanks
... View more
10-11-2023
11:55 AM
|
0
|
0
|
209
|
POST
|
Trying to use applyEdits to a hosted feature service in ArcGIS Online. I went to the query endpoint for the individual layer and queried out a feature which returned the features json for a single feature. "features" : [
{
"attributes" : {
"OBJECTID" : 62428,
"ADDID" : 63649,
"LONGITUDE" : "-20.39381937",
"LATITUDE" : "57.21860018",
"geoy" : 111.95,
"geox" : 170,
"ISSHELLADDRESS" : 0,
"SHELLID" : 0,
"DuplexID" : 63650,
"ADDRESSWITHUNIT" : "WhAt NOW MaN",
"ISSHFA" : 0
},
"geometry" :
{
"x" : 170.00002741069,
"y" : 111.9500441551
}
}
] I can take this, minus the "features" tag, and stick it in the updateFeatures for that individual feature layer and it works. Then I put the same content in a format for the applyEdits like below, and it fails. [
{
"id" : 0,
"adds" : [],
"updates": [
{
"geometry": {
"x" : 170.0069,
"y" : 11.9500
},
"attributes": {
"OBJECTID": 62428,
"ADDID": 63649,
"LONGITUDE": -80.39381937,
"LATITUDE": 27.21860018,
"geoy": 111.95,
"geox": 970,
"ISSHELLADDRESS": 0,
"SHELLID": 0,
"DuplexID": 63650,
"ADDRESSWITHUNIT": "It's Me I am the problem",
"ISSHFA": 0
}
}
],
"deletes": []
}
] I have tried multiple permutations with the larger format by removing the adds and deletes leaving just the updates and it's the same thing. I get back "code" : 400... Unable to apply edits. Other times it will show the Invalid JSON Primitive in "edit" I'm sure, like most times, I'm just missing something simple here. Thanks as always!
... View more
09-27-2023
12:15 PM
|
1
|
3
|
554
|
POST
|
Hi Jose, Realize this post is a long time ago. I'm trying to duplicate what I've done in a WPF app using Esri.ArcGISRuntime.WPF. I have an address layer that i need to symbolize by different values in multiple fields. I create queries and select by the desired fields. Then i add each point as a graphic with the desired symbology. I'm hoping that i can use Arcade to set symbols for addresses based on different fields. I'm going to try this but I thought I'd reach out to see if there is a better way.
... View more
09-21-2023
09:06 AM
|
0
|
0
|
455
|
POST
|
Good news, it's working. Bad news, I'm not sure what exactly happened. What I think happened is that there is some sort of disconnect between the code in the script window and the js file in the scripts folder. What I ended up doing was l tried to launch the script in an editor and then made changes. It just seemed to flip a switch or something and then the survey worked as expected.
... View more
09-10-2023
06:38 PM
|
0
|
0
|
220
|
POST
|
Hi, I've been using the Damage Assessment Solutions that includes Survey123 Connect XLS forms. Part of that is the JavaScript functions that should pull data from a feature service and use the data to populate a field in the survey. I keep getting a 400 error saying the URL is invalid. I've even created a URL that I know works and short circuited the JavaScript code and still get the invalid URL error. I've had this working in other surveys, just not the damage assessment. This is how the function is called from the XLS pulldata("@javascript","myJSFunctions.js","queryPolygon",string(${location}),"PARCELID",pulldata("@property","token"),true) Below is the code in the scripts folder. function queryPolygon(location,fields,token,debugmode){
if (location===""){
return (debugmode? "Location Object is empty":"");
}
var featureLayer = "https://services1.arcgis.com/**********/arcgis/rest/services/RE_PARCELS_WEB/FeatureServer/0";
var coordsArray = location.split(" ");
var coords = coordsArray[1] + "," + coordsArray[0]
var xmlhttp = new XMLHttpRequest();
var url = featureLayer + "/query?geometry=" + coords + "&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelIntersects&outFields=" + fields + "&returnGeometry=false&returnCount=1&f=json"
if (token){
url = url + "&token=" + token;
}
xmlhttp.open("GET",url,false);
xmlhttp.send();
if (xmlhttp.status!==200){
return (debugmode? xmlhttp.status:"");
} else {
var responseJSON=JSON.parse(xmlhttp.responseText)
if (responseJSON.error){
return (debugmode? JSON.stringify(responseJSON.error):"");
} else {
if (responseJSON.features[0]){
return JSON.stringify(responseJSON.features[0]);
}
else{
return (debugmode? "No Features Found":"");
}
}
}
} This is the error that is stored in the JSON field. See Picture {"code":400,"message":"Invalid URL","details":["Invalid URL"]} Then I created a url that I know works and hardcoded it into the code and still get the same error. function queryPolygon(location,fields,token,debugmode){
if (location===""){
return (debugmode? "Location Object is empty":"");
}
var featureLayer = "https://services1.arcgis.com/***********/arcgis/rest/services/RE_PARCELS_WEB/FeatureServer/0";
var coordsArray = location.split(" ");
var coords = coordsArray[1] + "," + coordsArray[0]
var xmlhttp = new XMLHttpRequest();
var url = featureLayer + "/query?geometry=" + coords + "&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelIntersects&outFields=" + fields + "&returnGeometry=false&returnCount=1&f=json"
//short circut url with known url that works when pasted into browser.
var url = "https://services1.arcgis.com/**********/arcgis/rest/services/RE_PARCELS_WEB/FeatureServer/0/query?geometry=-80.39273,27.21473&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelIntersects&outFields=PARCELID&returnGeometry=false&returnCount=1&f=json"
if (token){
url = url + "&token=" + token;
}
xmlhttp.open("GET",url,false);
xmlhttp.send();
if (xmlhttp.status!==200){
return (debugmode? xmlhttp.status:"");
} else {
var responseJSON=JSON.parse(xmlhttp.responseText)
if (responseJSON.error){
return (debugmode? JSON.stringify(responseJSON.error):"");
} else {
if (responseJSON.features[0]){
return JSON.stringify(responseJSON.features[0]);
}
else{
return (debugmode? "No Features Found":"");
}
}
}
} Any ideas would be greatly appreciated. As well on what the debug mode is and how would someone debug this code.
... View more
09-10-2023
07:57 AM
|
0
|
1
|
283
|
Title | Kudos | Posted |
---|---|---|
1 | 09-27-2023 12:15 PM | |
1 | 04-03-2019 10:27 AM | |
1 | 12-23-2021 08:08 AM | |
4 | 07-14-2022 02:01 PM | |
1 | 08-05-2021 08:46 AM |
Online Status |
Offline
|
Date Last Visited |
Tuesday
|