|
BLOG
|
Is there a way that a post won't show in the Latest Activity feed for each group it's been shared with? For example, this post shows up 18 other times. There's been a few times where other posts get lost in the blizzard of share notifications.
... View more
12-20-2023
11:06 AM
|
1
|
0
|
1096
|
|
POST
|
You can replace all your if statements by looping through an array of the possible agencies function FormatName(name, split_pt) {
var frontend = Left(name, split_pt);
var backend = Right(name, Count(name) - (split_pt + 1));
var front_len = Count(frontend);
var back_len = Count(backend);
var spacing = "";
var adjust = 1.3;
if (front_len < back_len) {
spacing = Concatenate(Array(Ceil(((back_len - front_len) / 2) * adjust), " "));
return spacing + frontend + TextFormatting.NewLine + backend;
} else {
if (back_len < front_len) {
spacing = Concatenate(Array(Ceil(((back_len - front_len) / 2) * adjust), " "));
return frontend + TextFormatting.NewLine + spacing + backend;
} else {
return frontend + TextFormatting.NewLine + backend;
}
}
}
var Agency = $feature.AgencyName2;
var names = [
" Water Service Area",
" Riverside Public Utilities (RPU)",
" San Bernardino",
" Mutual Water Company",
];
for (var i in names) {
var sb = Find(names[i], Agency)
if (sb > -1) return FormatName(Agency, sb)
}
return "Agency not found"
... View more
12-20-2023
10:24 AM
|
1
|
1
|
1815
|
|
POST
|
Here's how to filter out the records to only show the last twelve readings from a particular sensor. var p = Portal("https://arcgis.com");
var table = FeatureSetByPortalItem(
p, "0749f4597e054caf809b5b55d0b869d4",
0,
['sensor_id','time_stamp','pm25calibrated','avg_'],
false
)
var sensor = $feature.sensor_id;
var table_twelve = Filter(table, "avg_ = '12' AND sensor_id = @sensor")
return Top(OrderBy(table_twelve,"time_stamp desc"),12)
... View more
12-18-2023
06:43 AM
|
0
|
0
|
1214
|
|
BLOG
|
Nice write-up! You can open the Command Console in a specific directory by opening the File Explorer and navigating to that directory above it. Right click on the directory and select "Open in Terminal"
... View more
12-15-2023
08:33 AM
|
1
|
0
|
2433
|
|
POST
|
In your if statements, you have misplaced parenthesis for the Count functions on bld_result (lines 1, 7, and 13). And you should have a return if both counts are zero. if(Count(parcel_inside_ez) > 0 && Count(bld_result) > 0){
return "This residential property is within the enterprise zone."
}
// Check to see if the selected Tax Parcel buffered feature intersected the Enterprise Zone FeatureSet
// Check to see if the filtered Buildings did not intersect the Tax Parcel buffered feature
else if(Count(parcel_inside_ez) > 0 && Count(bld_result) == 0){
return "This is not a residential property."
}
// Check to see if the selected Tax Parcel buffered feature intersected the Enterprise Zone FeatureSet
// Check to see if the filtered Buildings intersected the Tax Parcel buffered feature
else if(Count(parcel_inside_ez) == 0 && Count(bld_result) > 0){
return "This residential property is not within the enterprise zone."
}
// If both counts are zero
else {
return "This property is not residential and is not within the enterprise zone."
}
... View more
12-13-2023
07:22 AM
|
0
|
0
|
2385
|
|
POST
|
If your ultimate goal is to create a app where the items can be toggled on and off through the legend, you can use the Interactive Legend instant app.
... View more
12-13-2023
05:49 AM
|
1
|
1
|
5147
|
|
POST
|
Your code is using a recycling cursor (the default method). You have set the useRecyclingCursor parameter to false when using the Search method. Using c As RowCursor = CType(mm, BasicFeatureLayer).Search(qf, false) Read a little more about recycling cursors here
... View more
12-13-2023
05:44 AM
|
1
|
1
|
1534
|
|
POST
|
I noticed that your code doesn't show the field aliases (if they are present). Here's a modification that shows them. var fieldInfos = []
var attributes = {}
var fields = Schema($feature).fields
for (var att in $feature) {
if (!IsEmpty($feature[att])) {
var alias = att;
for (var i in fields){
if (fields[i].name == att) alias = fields[i].alias
}
Push(fieldInfos, {fieldName: alias})
attributes[alias] = $feature[att]
}
}
return {
type: 'fields',
title: 'An Expression to Skip Nulls',
fieldInfos,
attributes
}
... View more
12-12-2023
07:39 AM
|
6
|
1
|
7359
|
|
POST
|
Would the Interactive Legend instant app be a viable alternative? https://www.esri.com/arcgis-blog/products/instant-apps/mapping/interactive-legend/
... View more
12-12-2023
06:21 AM
|
0
|
1
|
2042
|
|
POST
|
Take a look at this blog post by @jcarlson about how to "memorize" a FeatureSet. You should be able to use the same logic to loop through both FeatureSets to combine them into one.
... View more
12-07-2023
01:03 PM
|
0
|
0
|
1003
|
|
POST
|
The next step it to to see what the ubRecordsSorted FS contains. Put in a return statment on line 11 and see if you're getting the same records multiple times.
... View more
12-07-2023
12:15 PM
|
0
|
1
|
675
|
|
POST
|
Can you run it in the code editor? This will show the returned FeatureSet and the console items that Josh also suggested editor.png You might have to put in a specific parcelPID to test it var parcelPID = "01824000034"
... View more
12-07-2023
12:00 PM
|
0
|
3
|
4012
|
|
POST
|
What do you see if you put in "return ubRecordsSorted" at line 8 and run this in the editor? Do you get the expected records?
... View more
12-07-2023
11:04 AM
|
0
|
8
|
4020
|
|
POST
|
Showing that other table makes it a little more understandable. In that case, leave off that second GroupBy expression and use your original version. What is the error you're getting on line 7?
... View more
12-06-2023
01:43 PM
|
0
|
2
|
2400
|
|
POST
|
If you have a field in your table that contains the mileage for each road, you would add that to the GroupBy function. Or you could use the "SHAPE__Length" field. However, since that won't be in miles, you would have to convert that in the Expression. Here, I'm making the conversion from meters to miles var stats = groupby(sourceTable, 'RoadNumber',
[
{name: 'Total_Score', expression: 'Individual_Removal_Score', statistic: 'SUM'},
{name: 'Total_Miles', expression: 'SHAPE__Length * 0.000621371', statistic: 'SUM'}
]
); Then in the final line, you would use that summarized length return iif(Lookup == null, null, ((Lookup.Total_Score)/Lookup.Total_Miles));
... View more
12-06-2023
12:47 PM
|
0
|
4
|
2410
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 2 weeks ago | |
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|