|
POST
|
Hi @DianaWilson1 , I assume you applied the text formatting to the original value and not to the resulting min and max value after processing the values. It is best to apply it on the lines below: // determine min and max values
var minval = Text(MinOK(lst), "#,###");
var maxval = Text(MaxOK(lst), "#,###"); This will return the result with the thousands separator as shown below:
... View more
11-20-2020
09:16 AM
|
1
|
1
|
8071
|
|
POST
|
Hi @Anonymous User , If you want to try out Arcade, you can create a new expression for the symbology and do the concatenation virtually and visualize the result. Simply use something like: $feature.Finished + ", " + $feature.Area
... View more
11-20-2020
07:41 AM
|
0
|
0
|
1569
|
|
POST
|
Hi @DianaWilson1 , Can you share more information about how you implemented the expression? I just did a test with the values you shared in the image and it works as expected:
... View more
11-20-2020
07:34 AM
|
0
|
3
|
8080
|
|
POST
|
Hi @DianaWilson1, See my answer shared in your other post here: https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-for-area-ranges-max-and-min-with-null-values/m-p/1003193
... View more
11-19-2020
02:48 PM
|
0
|
0
|
2068
|
|
POST
|
Hi @DianaWilson1 , Have a look at the example below. It consists of 3 functions ("RemoveNulls", "MinOK" and "MaxOK") and at the end a couple of lines of code to create the initial list from your attribute values. It will remove the empty values from the list and return a corrected list that allows you to use the Min and Max (and other) functions: Function RemoveNulls(lst1) {
// remove empty values from list
var lst2 = [];
for (var i in lst1) {
if (!IsEmpty(lst1[i])) {
lst2[Count(lst2)] = lst1[i];
}
}
return lst2;
}
Function MinOK(lst1) {
// return min from corrected list
var lst2 = RemoveNulls(lst1);
if (Count(lst2)>0) {
return Min(lst2);
} else {
return Null;
}
}
Function MaxOK(lst1) {
// return max from corrected list
var lst2 = RemoveNulls(lst1);
if (Count(lst2)>0) {
return Max(lst2);
} else {
return Null;
}
}
// read your input values
var AREA1 = 3; // $feature.AREA1
var AREA2 = 7; // $feature.AREA2
var AREA3 = null; // $feature.AREA3
var AREA4 = 2; // $feature.AREA4
// create a list
var lst = [AREA1, AREA2, AREA3, AREA4];
// determine min and max values
var minval = MinOK(lst);
var maxval = MaxOK(lst);
// return result
return minval + "-" + maxval;
... View more
11-19-2020
02:26 PM
|
0
|
5
|
8108
|
|
DOC
|
Hi @Anonymous User and @Anonymous User , Do you know if there are any issues with private messaging? I received a private message with an attachment (a ZIP with data to test with) and when I hover over the download button it seems to link to a ZIP file: However, when I click on the button it downloads an html file (and not the ZIP with data): Also trying to reply to this message resulted in an error: Any ideas?
... View more
11-18-2020
12:24 PM
|
0
|
0
|
22478
|
|
POST
|
Hi @DonovanC , I tried to reply you private message, but I think there is something not working correctly at this moment. I was not able to download the ZIP you shared, since for some reason it end up downloading a download.html page and not the ZIP (weird). Also when I tried to answer with a private message an error occurred. If possible please send the ZIP to "xbakker[at]esri.co" (and yes ".co" stands for Colombia).
... View more
11-18-2020
12:10 PM
|
0
|
0
|
8050
|
|
POST
|
Hi @JoshuaBixby , You're not the only one that has made mistakes with this zero index month weirdness that is part of JavaScript. I have been there as well (and more than once...).
... View more
11-18-2020
10:46 AM
|
1
|
0
|
4591
|
|
POST
|
Hi @DonovanC , Not sure what is going wrong. I just did a test changing the attribute of the polygons depending if there are points inside the polygon and it all works as expected. Arcade expression: Capturing a new polygon with a point inside: ... automatically gets codes with "Yes" (green): and when creating a polygon that has no point inside: will automatically get the code "No" (red): Maybe it is data related. Would it be possible te receive a small sample of the data?
... View more
11-18-2020
10:43 AM
|
1
|
2
|
8055
|
|
POST
|
Hi @JoshuaBixby , According to the information provided by the OP, the month is used to assign January to July to Spring and August to December to Fall. Since the Month function on a date in July will be return the value 6, the expression should check for values < 7 to assign Spring and Fall for all other values. See the sample below: var aDate = Date(2020, 6, 22);
Console(aDate);
var datemonth = Month(aDate);
Console(datemonth);
var maint = "Non-schedule";
if (datemonth < 7) {
return maint + " Spring";
} else {
return maint + " Fall";
} This will write to the console: 2020-07-22T00:00:00-05:00
6 The date is in July and the month will return 6, so the value returned is "Non-schedule Spring"
... View more
11-18-2020
09:04 AM
|
2
|
2
|
4598
|
|
POST
|
Hi @DonovanC , The first thing to look at would be making sure that your layer has GlobalID's. This is required for an attribute rule to work. I did a test with some slightly different code and it seems to work: var fs = FeatureSetByName($datastore, "buffers");
var LeakSurveys = Intersects(fs, $feature);
if (Count(LeakSurveys) > 0) {
return "Yes";
} else {
return "No";
} The expression: Attribute rule configuration: The result symbolized by LeakSurvey (Yes/No): Remember to check your GlobalID's:
... View more
11-18-2020
08:56 AM
|
0
|
4
|
8061
|
|
POST
|
Hi @LucasMurray2 , To elaborate a little more on the Arcade option mentioned by @Anonymous User this is possible but probably not your best option. It would consist in classifying the MultiReports into three classes and combine the description of the classes with the OffenseCat and symbolize each combination. If your data does not have values for each combination and the data is dynamic you may end up "hacking" the json definition of the web map to include the missing classes. So I would probably recommend to try the option provided by @Anonymous User .
... View more
11-18-2020
08:14 AM
|
0
|
0
|
2348
|
|
POST
|
Hi @KhemAryal and @JoshuaBixby , See the example below: // change the name of the field
var datemonth = Month($feature["Name of the Date Field"]);
var maint = Proper(DomainName($feature,"MAINTENANCE_TYPE"), "firstword");
if (datemonth < 7) {
return maint + " Spring";
} else {
return maint + " Fall";
} Note that the month value is a value from 0 to 11 and not 1 to 12. So spring (including July) should be a value < 7.
... View more
11-18-2020
07:52 AM
|
1
|
4
|
4602
|
|
POST
|
Hi @StevenDague , I think this is behavior as designed. The Arcade expression will calculate the area in the fly whenever you click on a feature and show this in the pop-up. The information is not stored in the schema and when you edit a feature you will only see the fields that are part of the schema and the Arcade expression is not.
... View more
11-18-2020
06:19 AM
|
0
|
0
|
1529
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|