POST
|
I just added a screenshot. It's returning nulls in the featureset. I don't think I'm loading the data into the featureset correctly.
... View more
11-29-2023
11:51 AM
|
0
|
0
|
380
|
POST
|
I have an expression that buffers a line feature and returns a list of intersecting parcel use code descriptions. Currently this outputs an array but I'd like to make it a featureset so I can use groupby to count up the totals for each use type. Everything in the code below works until I get to the dictionary part. Any suggestions? Here is the dataset being queried: https://services1.arcgis.com/hGdibHYSPO59RG1h/arcgis/rest/services/L3_TAXPAR_POLY_ASSESS_gdb/FeatureServer/0 var ParcInt = Intersects(FeatureSetByName($map, "AllParcels",['USE_CODE']), BufferGeodetic($feature, 50, "feet"))
var arr_index = 0;
var NameList = []
var a ="";
for(var x in ParcInt){
NameList[arr_index] = mid(x.USE_CODE,1,1)
a =NameList[arr_index];
NameList[arr_index]=decode(a,
"0","Multi-USe",
"1","Residential",
"2","Open Space",
"3","Commercial",
"4","Industrial",
"5","Personal Property",
"6","Forest Property - Chapter 61",
"7","Agricultural",
"8","Recreational Property",
"9","Exempt Property",
'');
++arr_index;;
}
//return namelist
var newDict = {
fields: [
{ name: "Use Type", type: "esriFieldTypeString" },
{ name: "Count", type: "esriFieldTypeInteger" },
],
'geometryType': '',
'features':NameList
};
return FeatureSet(Text(newDict));
... View more
11-29-2023
11:32 AM
|
0
|
3
|
392
|
POST
|
Thanks again. It works with that sample dataset I provided but not with my actual data. Is there something else that needs to be done to use a secured service with stored credentials?
... View more
09-26-2023
08:11 AM
|
0
|
0
|
572
|
POST
|
@jcarlson Year install is an integer that contains some null values. I realize I would have to account for the null values in the function, but that's still only returning one record in the featureset. I published a copy of the dataset here: https://www.arcgis.com/home/item.html?id=ad72f530682f4a4a94e65ee996c26bb0#data
... View more
09-21-2023
07:48 AM
|
0
|
1
|
639
|
POST
|
Wow thanks, Josh! That seems a lot more efficient, but grp is returning a featureset with just a single row rather than all three. Am I missing something else?
... View more
09-21-2023
07:24 AM
|
0
|
3
|
643
|
POST
|
I'm trying to make a data expression for a serial chart that groups years into categories rather than showing counts for each year. My year field is just stored in an integer field. This is what I've come up with so far but it's not working. var portal = Portal('https://arcgis.com');
var fs = FeatureSetByPortalItem(
portal,
'xxxxxxxxxxxxx',
0,
[
'YearInstall'
],
true
);
var results = [];
for (var i in fs){
var yearInstall = fs[i].YearInstall;
var dec = IIf(yearInstall >= 1912 && yearInstall <= 1961, "1",
IIf(yearInstall >= 1962 && yearInstall <= 1991, "2",
IIf(yearInstall >= 1992 && yearInstall <= 2023, "3",
'other')));
results[i] = dec;
}
return results;
... View more
09-20-2023
12:49 PM
|
0
|
6
|
719
|
POST
|
I'm currently experiencing the same thing on a survey that has been functioning fine all year up until today. Any suggestions?
... View more
09-19-2023
03:22 PM
|
0
|
0
|
183
|
POST
|
Check for an iOS update. Field Maps requires at least iOS 14.5. If your device is too old you may be unable to install the latest OS and won't be able to get the latest version of Field Maps.
... View more
07-06-2023
08:51 AM
|
0
|
0
|
287
|
POST
|
I've tried that and it seems like it's grouping the use types together properly but not applying the use code descriptions correctly. Any ideas?
... View more
05-08-2023
07:29 AM
|
0
|
1
|
632
|
POST
|
Thanks! That makes sense, but I'm having trouble getting that to work. I moved the decode up into the first loop but now everything is returning as "Other". Do I have to change something with the HasKey? var buffer = BufferGeodetic($feature, 50, "feet")
var int_ma = Intersects(FeatureSetByName($map, "AllParcels"), BufferGeodetic($feature, 50, "feet"))
var leng = LengthGeodetic($feature, 'feet')
var int_dict = {}
var xs = ""
for (var i in int_ma){
var Ucode = decode(i,
"0101", "Multiple-Use, Primarily Residential",
"0102", "Multiple-Use, Primarily Residential",
"0104", "Multiple-Use, Primarily Residential",
"031", "Multiple-Use, Primarily Commercial",
"0316", "Multiple-Use, Primarily Commercial",
"0321", "Multiple-Use, Primarily Commercial",
"101", "Residential, Single Family",
"1010", "Residential, Single Family",
"1014", "Residential, Multi-family",
"102", "Residential, Multi-family",
"130", "Residential, Vacant Land",
"300", "Commercial",
"3000", "Commercial",
"302", "Commercial",
"400", "Industrial",
"4000", "Industrial",
"901", "Exempt Property",
"902", "Exempt Property",
'other');
var xs = AreaGeodetic(Intersection(buffer, i), 'square-feet')
if(HasKey(int_dict,i.USE_CODE)){
int_dict[i.USE_CODE] += xs
} else {
int_dict[i.USE_CODE] = xs
}
var total = 0
var out_str = ''
for (var t in int_dict){
total += sum(number(int_dict[t]))
}
for (var d in int_dict){
out_str += '\n' + Ucode + ' - ' +round(number(int_dict[d])/(total)*leng,2)+" Ft"
}}
return out_str
... View more
05-05-2023
07:43 AM
|
0
|
3
|
644
|
POST
|
I have an arcade expression for a popup that returns a text string comprised of a land use description and a length. How would I go about summarizing the total length by the land use description? var buffer = BufferGeodetic($feature, 50, "feet") var int_ma = Intersects(FeatureSetByName($map, "AllParcels"), BufferGeodetic($feature, 50, "feet")) var leng = LengthGeodetic($feature, 'feet') var int_dict = {} var xs = "" for (var i in int_ma){ var xs = AreaGeodetic(Intersection(buffer, i), 'square-feet') if(HasKey(int_dict,i.USE_CODE)){ int_dict[i.USE_CODE] += xs } else { int_dict[i.USE_CODE] = xs } var total = 0 var out_str = 0 for (var t in int_dict){ total += sum(number(int_dict[t])) } for (var d in int_dict){ var Ucode = decode(d, "0101", "Multiple-Use, Primarily Residential", "031", "Multiple-Use, Primarily Commercial", "101", "Residential, Single Family", "102", "Residential, Multi-family", "1320", "Residential, Vacant Land", "140", "Residential, Other", "300", "Commercial", "3000", "Commercial", "400", "Industrial", "901", "Exempt Property", 'other'); out_str += '\n' + Ucode + ' - ' +round(number(int_dict[d])/(total)*leng,2)+" Ft" }} return out_str
... View more
05-03-2023
09:59 AM
|
0
|
8
|
692
|
POST
|
Was this ever fixed? I am still experiencing this on version 3.17.
... View more
02-23-2023
02:07 PM
|
0
|
0
|
296
|
POST
|
You'll have to use Map Viewer Classic. The screenshot you attached appears to be in the new Map Viewer. https://doc.arcgis.com/en/arcgis-online/reference/configure-pop-ups.htm there are instructions in here for showing images within the popup.
... View more
01-23-2023
06:28 AM
|
0
|
0
|
527
|
POST
|
@IsmaelChivite is there an official solution for passing attributes with special characters to Survey123?
... View more
11-28-2022
07:55 AM
|
0
|
0
|
1038
|
Title | Kudos | Posted |
---|---|---|
3 | 08-29-2022 02:04 PM | |
2 | 08-22-2022 12:08 PM | |
2 | 07-28-2022 10:38 AM | |
2 | 05-03-2018 06:28 AM |
Online Status |
Offline
|
Date Last Visited |
03-06-2024
09:40 PM
|