POST
|
Hi Jeff, Think you may have marked the wrong reply as the solution, but I'm glad to hear that it's all working for you now as you hoped 🙂 happy to help out! Josh
... View more
05-15-2023
10:24 PM
|
0
|
0
|
387
|
POST
|
Hi Jeff, Feel free to post your code and what's going wrong and I can review it for you! Cheers, Josh
... View more
05-15-2023
12:13 PM
|
0
|
0
|
399
|
POST
|
No worries 🙂 I'm glad I could help out and that you managed to solve it in the end!
... View more
05-13-2023
07:03 PM
|
0
|
0
|
487
|
POST
|
Hi Jeff, I think it should just work as is if you replace the out_path in your "outfc" line with the path to the new geodatabase (including the name of the geodatabase NewForestGIS.gdb). I'm pretty sure CopyFeatures defaults to outputting as a shapefile if it's writing to a folder and a feature class if it's writing to a geodatabase.
... View more
05-10-2023
10:23 PM
|
2
|
2
|
450
|
POST
|
Hi Laila, Is the "Highest Possible Score" an integer field as well? I realised my script was missing a close bracket, although I assume you fixed that to get it to run! To clarify are you setting this up in the Forms tab in a web map? I've managed to replicate it and get it to run perfectly using this code: var RESF1Score = $feature.RESF1
var RESF2Score = $feature.RESF2a + $feature.RESF2b
var RESF3Score = $feature.RESF3
function isTwenty(i) { return i == 20 }
var num20s = Count(Filter([RESF1Score, RESF2Score, RESF3Score], isTwenty))
When(num20s==3,20,num20s==2, 10, num20s==1, 5, 0) So I feel confident that the code I've written works and is a bit easier to understand! It might be worth putting a very simple calculation like return 50 to see whether the calculation is even running at all? Could you post a screenshot of the questions in the form builder as well?
... View more
05-10-2023
03:23 PM
|
0
|
2
|
495
|
POST
|
You're printing out Ucode which is just the most recent decoded value, replace "Ucode" with "d" in the out_str line to print out the relevant dictionary key.
... View more
05-08-2023
03:51 PM
|
0
|
0
|
629
|
POST
|
I think you need to change the decode to be decoding i.USE_CODE, as currently it's decoding the feature object itself? And you need to pass that decoded value into your dictionary not the i.USE_CODE, so something like this: 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.USE_CODE,
"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,UCode)){
int_dict[UCode] += xs
} else {
int_dict[UCode] = 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
03:40 PM
|
0
|
2
|
642
|
POST
|
Hi, I'm a little confused because the screenshot and your code above don't match - I'm guessing the problem is because there are multiple codes linked to one land use description (e.g. '0101' and '0102' for "Multiple-Use, Primarily Residential") so they're not being aggregated? If you use your "decode" before you write the key to the int_dict variable that should group it all correctly (i.e. using "Multiple-Use, Primarily Residental" use the key instead of the code). Otherwise it all looks good to me.
... View more
05-03-2023
07:48 PM
|
1
|
0
|
661
|
POST
|
Couldn't find any documentation on it but drop is basically "delete" in sql (https://www.w3schools.com/sql/sql_drop_table.asp) so I suspect that's why it's considered invalid. I can confirm I can't export a 'drop' feature class either, it'll work if you add a suffix though.
... View more
05-03-2023
04:43 PM
|
0
|
0
|
320
|
POST
|
Hi Leila, No worries, let me know how you get on 🙂 Josh
... View more
05-03-2023
04:34 PM
|
0
|
4
|
504
|
POST
|
Hey Rach, Yeah so if you go into configuration for the table and look at "actions" you can set it to filter the details widget based on the current selection!
... View more
04-25-2023
02:09 PM
|
0
|
0
|
305
|
POST
|
Yeah I don't think so unfortunately, the only other way I could think of would be formatting it in another column using HTML, but I suspect that HTML isn't actually supported for attribute tables.
... View more
04-22-2023
01:24 PM
|
0
|
1
|
722
|
POST
|
What sort of a web application are you using this in, an ArcGIS Dashboard or something else? I think you'd be able to do this in a data expression in a dashboard, but if you're aiming for a table in a Web AppBuilder or Experience Builder application you may have to settle for adding another field to your feature service and calculating it with the base URL and REG_ID value.
... View more
04-22-2023
01:21 AM
|
0
|
3
|
738
|
POST
|
Hi Sara, Would you be wanting to have the URL differ for each value by appending the RegID value on the end? I would recommend having an arcade expression that concatenates a base url with the RegID value and has that as a field in the features popup, something like: var RegID = $feature.RegID
var BaseURL = "yourUrl"
return BaseURL + Text(RegID) Or you can have custom text in the popup with a hyperlink, so it displays the RegID with the hyperlink being "yoururl{RegID}"
... View more
04-21-2023
05:51 PM
|
0
|
5
|
762
|
Title | Kudos | Posted |
---|---|---|
1 | 05-21-2023 10:47 PM | |
1 | 07-28-2020 10:24 AM | |
1 | 04-06-2023 12:00 AM | |
1 | 06-27-2023 10:36 PM | |
1 | 06-27-2023 10:14 PM |
Online Status |
Offline
|
Date Last Visited |
08-04-2023
06:55 AM
|