POST
|
Hi Xander Bakker Can you help me take this one step further? From my list of actions I want to only identify the actions that are "Completed", from this I want to find use the most recent completed actions date. My below script currently works as we have only just started collecting data so we don't have multiple completed dates. var a = Top(OrderBy(Intersects(FeatureSetByName($map,"All Actions"), Buffer($feature,20, 'meters')), 'CreationDate DESC'), 10);
var action = ''
var result = ''
var ndate = (1900/01/01)
for (var b in a){
if (b.Ranger_Action == "Completed"){
action = b.Ranger_Action + b.CreationDate
ndate = DateADD(b.CreationDate, 21, 'days')
result = " Next mow due" + Text(ndate, ' Y/MM/DD ')
}else{
// result = "Not regularly mowed"
}
}
return result I've tried adding in some if statements and a test date to look at if it is the most recent completed date. However this script isn't working yet and I assume there is a must simpler way of doing this. var a = Top(OrderBy(Intersects(FeatureSetByName($map,"All Actions"), Buffer($feature,20, 'meters')), 'CreationDate DESC'), 10);
var action = ''
var result = ''
var ndate = (1900/01/01)
var testdate = (1900/01/01)
for (var b in a){
if (b.Ranger_Action == "Completed" AND ndate == (1900/01/01)){
ndate = DateADD(b.CreationDate, 21, 'days')
result = " Next mow due" + Text(ndate, ' Y/MM/DD ')
} else if (b.Ranger_Action == "Completed"){
testdate = b.CreationDate;
if (b.testdate < ndate){
action = b.Ranger_Action + b.CreationDate
ndate = DateADD(b.CreationDate, 21, 'days')
result = " Next mow due" + Text(ndate, ' Y/MM/DD ')
}else {}
}else{
// result = "Not regularly mowed"
}
}
return result
... View more
02-04-2020
03:25 PM
|
0
|
0
|
4711
|
POST
|
Awesome, that has worked. I had started working on a for loop yesterday but I was getting confused by the date so its great to see how you converted it to Text. My alternative I was working on was using the YEAR(),MONTH(),DAY() functions however I found it very weird that they decided to go with IT speak rather than common language and put January as month 0 and December as month 11 (today is 05/02/2020 not 05/01/2020!!).
... View more
02-04-2020
12:23 PM
|
0
|
0
|
4711
|
POST
|
Hi Uri Gilad I've tried your script. I had to add in layer = Intersect(.....) as I'm interested in events that have happened within an area. However my date field is the default CreationDate and I have an error saying that it cannot call member property on this type. I've successfully managed to use the first suggested solution comparing max_date. I am now interested in being able to show Top 5 results using the top function. However I am yet to get this to work in a pretty manner of inserting the whole table into the popup or being able to put only selected fields in (and potentially later filtering by a field). I have managed to list the top 5 activities and dates, but I did not get these to be nicely beside each other (date: activity, new line ...) rather a list of all the activities and a list of all the dates.
... View more
02-03-2020
05:24 PM
|
0
|
3
|
4711
|
POST
|
Hi Xander Bakker I've tried this Top function for a popup. I get results within the attribute expression builder test. I have the displaying a description from one field (the expression). However the popup is showing no information available. Because it is returning as a table, does this need to be inputted into the popup in a different way? Or do I need to be calling out the couple of fields I am actually interested in from the table?
... View more
02-03-2020
03:00 PM
|
0
|
0
|
4711
|
POST
|
I have opened this AGOL map into ArcGIS Pro. Within Pro a second (different) layer which is also uses unclassed colours for symbology is now having its item within the legend wrongly flipped. #help ?!
... View more
01-06-2020
05:06 PM
|
0
|
4
|
2226
|
POST
|
Thanks Bruce. You picked up my typo! I had never heard of EPS before. I've tried georeferencing the PDF as an image this time. But I'll look into Imagemagick + Ghostscript next time.
... View more
12-10-2019
11:56 AM
|
1
|
0
|
2111
|
IDEA
|
This would be a good way to get around a legend bug I have https://community.esri.com/message/895640-legend-item-bug-arcgis-online
... View more
12-05-2019
06:03 PM
|
0
|
0
|
367
|
POST
|
I have a legend item in my AGOL map where the legend is showing the wrong data. See the image below. The most red is the highest number (369), yellow is the lowest number (0). In the legend on the map it has switched it so that red is low and yellow is high. I've tried inverting and saving, but this also inverts the legend in the map so that it is still wrong. The layer was created in ArcGIS Pro. Symbolised using unclassed colours (legend shows correctly here). Published to AGOL (no error messages show). Added into an AGOL Map. How do I fix this?
... View more
12-05-2019
05:09 PM
|
1
|
10
|
2690
|
POST
|
I'm trying to get information from designers who don't understand spatial file types but do know eps. Is there a way to bring in eps layers to Pro?
... View more
12-04-2019
01:08 PM
|
0
|
2
|
2283
|
POST
|
Thanks Xander. I'm not sure why my brain decided to try and overkill it with two buffers. I knew that there is likely some location error on both layers so maybe that was why. This was to find the closest power pole to a tree, however there will not be a cluster of poles near a tree so finding the first one within 5 meters works.
... View more
12-02-2019
12:45 PM
|
1
|
1
|
1381
|
POST
|
Hi Xander Bakker I'm trying to do a similar script of finding out if two point layer buffers overlap, however I'm coming across Execution Error: Illegal Argument var IntersectsPole = intersects(BUFFER($feature, 5, "meters"),BUFFER(FeatureSetByName($map,"Taupo_Poles_view"),1,"meters")); for (var f in IntersectsPole) { var a = f. pole_id; } return a What very simple thing have I forgotten?
... View more
11-27-2019
05:00 PM
|
0
|
3
|
1381
|
DOC
|
I tried to use the identical layers shown in the tutorial Non-Hispanic white population and Adult obesity (%)
... View more
11-20-2019
12:11 PM
|
0
|
0
|
24153
|
DOC
|
I don't seem to be able to use the Counts and Amounts (colour) shown in the tutorial. As soon as there are two variables it changes to the Colour and Size Dots.
... View more
11-19-2019
08:17 PM
|
0
|
0
|
24153
|
Title | Kudos | Posted |
---|---|---|
1 | 06-27-2017 10:07 PM | |
1 | 04-10-2019 03:03 PM | |
1 | 07-02-2017 04:35 PM | |
1 | 12-05-2019 05:09 PM | |
1 | 01-17-2019 12:38 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|