POST
|
Also, exporting to Excel works well to highlight duplicates on a non-advanced license.
... View more
08-08-2019
01:11 PM
|
1
|
0
|
1698
|
POST
|
That did work, maybe not the minutes difference milliseconds provides, but next day is good enough. Would adding more zeros after the decimal yield more precise results? I'm looking through past samples to see where I went wrong. Thanks!
... View more
04-25-2019
09:01 AM
|
0
|
0
|
1177
|
POST
|
Interesting. I'll give it a test in Pro, and report back. I know I tried DateDiff in 'years' early on, using change values of 1.0, without success.
... View more
04-25-2019
08:11 AM
|
0
|
0
|
1177
|
POST
|
I initially tried years, but from my testing, it only seemed to strip years from the date and subtract, even with the ".0" added. December 2018 to January 2019 would result in one full year, and the maintenance schedule thrown off (2019.0-2018.0 still 1.0). It is useful for multiple years though. As I've seen from some of your previous responses on the forums, months are only assigned 0-11 and days don't extend beyond 31, so after a couple days and some Googling I found the 'value' data format in milliseconds to work, plus you can code in conversions for days, minutes, hours or years in your fields as needed. Thanks for the input! I hoped Arcade not being in Collector yet was the issue. They are planning on adding the functionality though, right?
... View more
04-24-2019
01:53 PM
|
0
|
3
|
1177
|
POST
|
I'm having issues across platforms using Arcade to break my Valves features into different classes. The following script works perfectly in ArcPro (31,536,000,000 is the rough number of milliseconds in a year, and the code will properly change colors of valves outside of one year of maintenance within a few minutes): That code yields the following result in ArcPro (Note the broken valve is just showing it works in Pro, broken and lost symbology works in AGOL as well, but the data has not been updated to reflect the change in Pro): The result in an AGOL web app follows; code seems to only segregate elapsed time based on current date, not <null> values. Again, it also works for broken/lost valves. All of the symbology displays in the legend, however. I've tested the code using Collector and Explorer using both iPad and Android mobile platforms, but I don't get anything other than default value symbol. The web app still displays the same symbology from a mobile platform as it does PC, however, I don't collect points from our web app. We use an Arrow GPS connected to an iPad as our collection platform, and it doesn't make sense to switch apps to update. Default symbology displayed on Android, though the separate classes still exist in the legend: Any recommendations or help is appreciated. I've pasted the code on the bottom for easy manipulation. I'm just getting into code, and don't have the knowledge yet to make a more advanced app that can collect that we can download. Thanks in advance, and I hope this helps you all out there looking for a similar solution to finding a longer time based method for annual maintenance. collector arcade arcade expression arcade symbology arcade attribute expressions #arcade arcpro #AGOL long time #time #year #annual #annualmaintenance // set parameters for finding broken or lost valves first. var class If ($feature.BROKEN == "YES") { class = "Broken"; } else if ($feature.FOUND == "LOST") { class = "Lost"; } else { // this classification sets up different classes based on time of maintenance. Symbology adjustable via regular methods var startDate = Date($feature.DATE_OPERATION_CURRENT); var endDate = Date(Today ()); var change = DateDiff(endDate, startDate, 'value'); var result = When (change > 31536000000, "Due", change <= 31536000000, "Current", "Data Not Current") return result } return class //I realize I could probably replace "var result" with "class"
... View more
04-24-2019
09:59 AM
|
0
|
5
|
1718
|
Title | Kudos | Posted |
---|---|---|
1 | 08-08-2019 01:11 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|