POST
|
Thanks! I hadn't thought to examine the props object more carefully.
... View more
3 hours ago
|
0
|
0
|
41
|
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
4 hours ago
|
0
|
2
|
54
|
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
8 hours ago
|
0
|
0
|
7
|
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
9 hours ago
|
0
|
0
|
4
|
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
9 hours ago
|
0
|
1
|
7
|
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
Friday
|
1
|
4
|
59
|
POST
|
Since that field has Domains, are you using the same value for Label and the Code?
... View more
Thursday
|
1
|
1
|
57
|
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
Thursday
|
0
|
1
|
77
|
POST
|
What are the possible values of the three fields? Could you go into more detail about what types of returns you'd expect besides "Y" and "Unknown"?
... View more
Thursday
|
0
|
0
|
106
|
POST
|
The second DomainName appears to be incorrect. You have double quote before L but no closing double quote, no value, an extra 'n/a', and an extra parenthesis. Should that be like this? if (DomainName($feature, "systemBasisOfClassification1", "A) Records Review", "n/a") == "A) Records Review" &&
DomainName($feature, "systeminstallationDateRange", "L) 1991-2000", "n/a") == "L) 1991-2000") {
return DomainName($feature, "serviceLineClassification", "Non-Lead", "n/a");
}
... View more
Wednesday
|
1
|
0
|
58
|
POST
|
One issue is the When function doesn't have a default value. When I remove that from my test, I get the "Unable to execute" message function returnColorS(value){
When(
value == "Minor", "#dedede",
value == "Significant", "#C1C1C1",
value == "Major", "#D18E8E",
value == "Severe", "#D17578",
"#f00000"
);
}
... View more
a week ago
|
2
|
0
|
86
|
POST
|
That's controlled by the Display Field when the service was published. I can't see a way to change that in AGOL, but you can change that in ArcGIS Pro. Open up the Layer Properties dialog and select the Display tab. For example, this is how one of my services was set up in ArcGIS Pro and this is what the Rest service shows When I edit it, all the points show the Habitat field
... View more
a week ago
|
0
|
0
|
36
|
POST
|
It's frustrating that Arcade won't give you all the symbology for the possibilities in your code without scanning all the records. I have to use dummy values at the beginning of the data to get the legend to build properly. That being said, you can simplify your code this way function status(input) {
Decode(input, 1, "Lead", 2, "Non-Lead", 3, "Galvanized", 0, "Unknown", "NA")
}
var LeftSide = status($feature.custstatus)
var RightSide = status($feature.utilstatus)
if (LeftSide == "NA" || RightSide == "NA") return "Other" //returns "Other" if either are "NA"
return `${LeftSide} | ${RightSide}`
... View more
2 weeks ago
|
1
|
1
|
158
|
POST
|
The way you have the Filter written in this line, it's expecting the valve layer to have a SHEET field. var valvesInQuad = Filter(valves, "SHEET = @sheetID"); Do you have a field in the valve layer that contains that related sheetID values from the quad layer? Or do you need to use the Contains function to select the valves within the quad?
... View more
2 weeks ago
|
0
|
1
|
110
|
Title | Kudos | Posted |
---|---|---|
1 | Friday | |
1 | Thursday | |
1 | Thursday | |
1 | Wednesday | |
2 | a week ago |
Online Status |
Online
|
Date Last Visited |
11 hours ago
|