|
POST
|
You can use the Text function's formatting parameter "A" to return "AM" or "PM" for symbolizing the points. Here's an example. These points are labeled with the Collection time field (FishDate in my data) and I use this expression to symbolize them. Text($feature.FishDate, 'A') When you click Run in the Expression editor, it uses the first record in the dataset to evaluate the code. Clicking Done will run the code on the entire dataset (or at least the first thousand or so records) to build the symbology
... View more
11-15-2024
08:40 AM
|
1
|
1
|
1275
|
|
POST
|
The Arcade Labeling profile doesn't have access to the $map profile variable, only the $feature variable.
... View more
11-15-2024
06:55 AM
|
0
|
0
|
1920
|
|
POST
|
I'm not an expert on attribute rules, but from the documentation, it looks like you're missing the required object ID or global ID parameter in the updates object
... View more
11-14-2024
12:41 PM
|
1
|
0
|
1957
|
|
POST
|
Can you post your script? It would be helpful to see what it's returning
... View more
11-14-2024
08:49 AM
|
0
|
2
|
1964
|
|
POST
|
No, I haven't tried copying the widget to my extensions folder.
... View more
11-13-2024
06:38 AM
|
0
|
0
|
2062
|
|
POST
|
This post has several more lists of possible reserved words
... View more
11-13-2024
06:06 AM
|
2
|
1
|
2128
|
|
POST
|
Thanks! I hadn't thought to examine the props object more carefully.
... View more
11-12-2024
01:45 PM
|
0
|
0
|
964
|
|
POST
|
I've developing a widget and am working on the Settings panel. I'd like to automatically populate text boxes for the portal that the user is currently working in and their name instead of having them type in in themselves. What's the way to get this information?
... View more
11-12-2024
12:50 PM
|
0
|
2
|
977
|
|
POST
|
In v1.15, that line looks like this: import { type AnalysisToolInfo } from '@arcgis/analysis-ui-schema' and also has a squiggly line underneath it in the editor. However, the custom tool does seem to work properly OOTB
... View more
11-12-2024
08:31 AM
|
0
|
2
|
2079
|
|
POST
|
You could also consolidate your arrays with something like this, but you might prefer the more verbose method, which is easier to understand. var width1 = ["3m4m","4m"];
var width2 = ["1m","1m2m", "2m3m"];
var width3 = ["2m3m"];
var depth1 = ["1m","1m2m", "2m3m","3m4m","4m"];
var depth2 = ["2m3m", "3m4m","4m"];
var basesub1 = ["BDP","VDP"];
var basesub2 = ["BM","VM","VSP","VSM","VSP"];
var basesub3 = ["VSM","VM","BM"];
var basesub4 = ["VSP","PSS","PSD"];
... View more
11-12-2024
07:43 AM
|
0
|
0
|
633
|
|
POST
|
When posting code, please use the "Insert/Edit code sample" button instead of attaching it as a text file. It makes reviewing the code easier. You're using the When function with an implicit return, meaning it will return just the last executable statement. You'll have to combine them into one When function var PBwidth = ["3m4m","4m"];
var PBdepth = ["1m","1m2m", "2m3m","3m4m","4m"];
var PBbasesub = ["BDP","VDP"];
var SBwidth = ["3m4m","4m"];
var SBdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var SBbasesub = ["BM","VM","VSP","VSM","VSP"];
var PDwidth = ["1m","1m2m", "2m3m"];
var PDdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var PDbasesub = ["BDP","VDP"];
var TDwidth = ["2m3m"];
var TDdepth = ["2m3m", "3m4m","4m"];
var TDbasesub = ["BDP","VDP"];
var TDflowpres = ["FP"];
var SDwidth = ["1m","1m2m", "2m3m"];
var SDdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var SDbasesub = ["VSM","VM","BM"];
var MDwidth = ["1m","1m2m", "2m3m"];
var MDdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var MDbasesub = ["VSP","PSS","PSD"];
When (IndexOf(PBwidth, $feature.Feat_width) > -1 && IndexOf(PBdepth, $feature.Feat_depth) > -1 && IndexOf(PBbasesub, $feature.Base_sub) > -1, "PB",
IndexOf(SBwidth, $feature.Feat_width) > -1 && IndexOf(SBdepth, $feature.Feat_depth) > -1 && IndexOf(SBbasesub, $feature.Base_sub) > -1, "SB",
IndexOf(PDwidth, $feature.Feat_width) > -1 && IndexOf(PDdepth, $feature.Feat_depth) > -1 && IndexOf(PDbasesub, $feature.Base_sub) > -1, "PD",
IndexOf(TDwidth, $feature.Feat_width) > -1 && IndexOf(TDdepth, $feature.Feat_depth) > -1 && IndexOf(TDbasesub, $feature.Base_sub) > -1 && IndexOf(TDflowpres, $feature.flow_pres) > -1, "TD",
IndexOf(SDwidth, $feature.Feat_width) > -1 && IndexOf(SDdepth, $feature.Feat_depth) > -1 && IndexOf(SDbasesub, $feature.Base_sub) > -1, "SD",
IndexOf(MDwidth, $feature.Feat_width) > -1 && IndexOf(MDdepth, $feature.Feat_depth) > -1 && IndexOf(MDbasesub, $feature.Base_sub) > -1, "MD",
"Unknown") You could also use individual if functions, with a final return "Unknown" when none of the conditions are met, if that makes it easier to read var PBwidth = ["3m4m","4m"];
var PBdepth = ["1m","1m2m", "2m3m","3m4m","4m"];
var PBbasesub = ["BDP","VDP"];
if (IndexOf(PBwidth, $feature.Feat_width) > -1 && IndexOf(PBdepth, $feature.Feat_depth) > -1 && IndexOf(PBbasesub, $feature.Base_sub) > -1) return "PB";
var SBwidth = ["3m4m","4m"];
var SBdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var SBbasesub = ["BM","VM","VSP","VSM","VSP"];
if (IndexOf(SBwidth, $feature.Feat_width) > -1 && IndexOf(SBdepth, $feature.Feat_depth) > -1 && IndexOf(SBbasesub, $feature.Base_sub) > -1) return "SB";
var PDwidth = ["1m","1m2m", "2m3m"];
var PDdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var PDbasesub = ["BDP","VDP"];
if (IndexOf(PDwidth, $feature.Feat_width) > -1 && IndexOf(PDdepth, $feature.Feat_depth) > -1 && IndexOf(PDbasesub, $feature.Base_sub) > -1) return "PD";
var TDwidth = ["2m3m"];
var TDdepth = ["2m3m", "3m4m","4m"];
var TDbasesub = ["BDP","VDP"];
var TDflowpres = ["FP"];
if (IndexOf(TDwidth, $feature.Feat_width) > -1 && IndexOf(TDdepth, $feature.Feat_depth) > -1 && IndexOf(TDbasesub, $feature.Base_sub) > -1 && IndexOf(TDflowpres, $feature.flow_pres) > -1) return "TD";
var SDwidth = ["1m","1m2m", "2m3m"];
var SDdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var SDbasesub = ["VSM","VM","BM"];
if (IndexOf(SDwidth, $feature.Feat_width) > -1 && IndexOf(SDdepth, $feature.Feat_depth) > -1 && IndexOf(SDbasesub, $feature.Base_sub) > -1) return "SD";
var MDwidth = ["1m","1m2m", "2m3m"];
var MDdepth = ["1m","1m2m", "2m3m", "3m4m","4m"];
var MDbasesub = ["VSP","PSS","PSD"];
if (IndexOf(MDwidth, $feature.Feat_width) > -1 && IndexOf(MDdepth, $feature.Feat_depth) > -1 && IndexOf(MDbasesub, $feature.Base_sub) > -1) return "MD";
return "Unknown";
... View more
11-12-2024
07:32 AM
|
0
|
1
|
4476
|
|
POST
|
If I understand your logic correctly, this should work var sizes = ["1m", "1m2", "2m3m", "3m4m", "4m"];
var angles = ["Sv", "V"];
When ($feature.Feat_width == "1m" || $feature.Feat_depth == "4m" || IndexOf(["St", "M"], $feature.Slope_degrees) > -1, "N",
IndexOf(sizes, $feature.Feat_width) > -1 && IndexOf(sizes, $feature.Feat_depth) > -1 && IndexOf(angles, $feature.Slope_degrees) > -1, "Y",
"Unknown");
... View more
11-08-2024
07:43 AM
|
1
|
4
|
4529
|
|
POST
|
Since that field has Domains, are you using the same value for Label and the Code?
... View more
11-07-2024
11:11 AM
|
1
|
1
|
1398
|
|
POST
|
Change line 12 to this return `Value ${yesCount + 1}`
... View more
11-07-2024
09:11 AM
|
1
|
1
|
3025
|
|
POST
|
The script works if I put in another date field or just a date. Are you using this to calculate a field? If so, I'm guessing field is numeric while your script is returning text.
... View more
11-07-2024
09:07 AM
|
0
|
1
|
1638
|
| Title | Kudos | Posted |
|---|---|---|
| 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 | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|