|
POST
|
Have you looked at the Water Geometric Network Editing & Analysis tools? One tool--Split Lines At Selected Points--does exactly what you're asking for, without generating a separate output. When I use it, the only attributes that change are SHAPE_Length and Last Update Date (because I'm using editor tracking).
... View more
09-14-2018
02:18 PM
|
2
|
2
|
2253
|
|
IDEA
|
Since you already know what stores you want to survey, what if you tried a different workflow: Create and host a point layer of the stores, with the attributes set up exactly the same way you want them in your survey. Use that feature service to publish your survey Make use of the Inbox to filter what records are available when you open the survey Now, when you arrive at a store, you'll see records for A, B, and C in the Inbox. Open up A, fill it out, save it. When you arrive at the next store, A should no longer appear in the Inbox--only B and C. This requires a few more steps on your part to initially set up, but should have the desired effect.
... View more
09-14-2018
01:49 PM
|
0
|
1
|
929
|
|
POST
|
I had forgotten about this question--I've actually got it working now. I went through a few iterations and restarts with my data, so I'm not 100% sure exactly what did it, but here's my current setup that's working: The field set as a subtype is a Short Integer field. This field has a coded value domain applied--the domain is for field type Short. The aliases of the number codes are the text descriptions I want (0 for Grass, 10 for Garbage, etc). The subtype field updates a Text field. This text field has a second coded value domain applied. Here, the values and aliases are matching text descriptions (Debris / Debris, e.g.). I don't believe I had a domain assigned to that Text field before, so applying it seems to have done the trick. I'm not sure why, because it was the subtype field that wasn't displaying properly. If, for whatever reason, that doesn't solve it for you, I do have a third coded value domain. None of my fields currently use it; I had created it at some point and then never got around to deleting it. It's identical to the first domain (0 / Grass etc), but it's set up for a Text field type instead of a Short. I doubt this is having any effect on my situation, but I wanted to throw it out there in case it's solving something in some weird way. I'm going to go ahead and mark this answer as correct for my question. If it doesn't solve yours, I would suggest posting a new question detailing your setup, and maybe someone will be able to answer it. I wouldn't know how to troubleshoot this any further if it doesn't work.
... View more
08-01-2018
01:37 PM
|
0
|
0
|
3210
|
|
POST
|
Everything was done via ArcGIS Pro. The FGDB was built, populated (using local time), and published from there. I believe it was actually the blog you linked to that clued me in to setting the time zone at the time of publishing (I hadn't on my first attempt, and noticed the time/date issues the blog discusses soon after). The offline FGDB was never time-enabled, but as I understand it, it's still treated as residing in the time zone of my local machine (it's not on a server anywhere). For a few weeks, my workflow of adding data to the FGDB and then appending to the published feature service worked just fine. Date fields are populated without specified times--as I'm entering data on a new feature each date field shows a time of 12:00 AM until I press Enter or save my edits, at which point it shows only the date I entered. When appended to the hosted feature service, the dates all showed up as the date plus several hours, resulting in a display of 12:00am when viewing the data in a web map from this time zone. A couple weeks ago, that just stopped, and now any date that's appended retains the same time stamp without calculation, resulting in an incorrect time date/time displayed in the web map. I'm sure I've got something completely backwards here, but I'm still not sure why the workflow worked fine for a while and then stopped. Because the web map needs to run several Arcade calculations based on the various dates, I can't simply switch to using text fields for these, can I? Otherwise, I really only need the dates for this data, and not the times.
... View more
07-23-2018
07:53 AM
|
0
|
0
|
5157
|
|
POST
|
Any ideas on what's going on? Whenever I append to the feature service, the datetime fields stay exactly the same, when previously they added the appropriate number of hours to convert to UTC. I can work around this in a couple ways--manually adding the 6 hours when I initially enter the data, or using the field calculator to do it--but since there are up to 7 datetime fields for each feature, I'd really like to get back to the previous workflow where it automatically converted. I set the time zone correctly when I initially published the feature service (and, as stated, it worked just fine for the better part of a month); I can't think of anything I did to trigger a change in behaviour.
... View more
07-17-2018
12:52 PM
|
0
|
5
|
5157
|
|
POST
|
The above expression should have no overlap or gap that I am aware of, due to the way else if statements are handled. if a feature was last edited 3 minutes ago, it would evaluate the first statement as True, and no further else case is triggered, returning a value of 'In progress'. If a feature was edited 3 hours ago, it would evaluate the first statement as False, and the second statement as True; the function then stops evaluating there, returning a value of 'Current'. A feature edited 3 weeks ago evaluates as False for the first two statements, and True for the third, returning a value of 'Completed'. A feature edited 3 years ago evaluates all three statements as False, and triggers the final Else case ('Not Completed'). Is this the workflow you're looking for? A couple things to consider: Your legend, once you apply this expression, only shows values that actually exist at the time you set it. If you have no data with an edit date under 2 hours, for example, then that value won't appear in the Types to symbolize. You will have to create a temporary feature with the value you need. Time zones may be an issue, and I'm not much help there as I'm still having my own frustrations with them. Unless otherwise specified, hosted feature services are treated as being in UTC, and the web map then translates that UTC time to the local time zone viewing it. If not properly accounted for, that time shift may be affecting your first two if statements.
... View more
07-13-2018
03:34 PM
|
0
|
2
|
3352
|
|
POST
|
One thing you need to be careful of is the units part of the DateDiff() function. It looks like you're trying a calculation inside there for your first two. It should be set up as DateDiff(datetime1, datetime2, 'units'). When this is part of an if statement, you can then use an operator (<2, eg) after the closing parenthesis. Your third and fourth DateDiff() functions look to be written correctly, though the fourth is not needed. That else case will only ever trigger if the years are greater than 1 anyway. What happens when you delete the fourth DateDiff() function and try changing the first two to the following? if(DateDiff(Edited, Now(), 'hours')<2){ else if(DateDiff(Today(), Edited, 'hours')<8{ [Note that you shouldn't need to specify that the hours are greater than 1, because anything under 2 will already be caught by the first statement] var Edited = Date($feature.EDITDATE);
if(DateDiff(Edited, Now(), 'hours')<2){
var Status = 'In Progress';
}
else if(DateDiff(Today(), Edited, 'hours')<8{
var status = 'Current';
}
else if(DateDiff(Year(Edited), Year(Now()), 'years')<=1){
var status = 'Completed';
}
else {
var status = 'Not COmpleted';
}
return status
... View more
07-13-2018
01:18 PM
|
0
|
4
|
3352
|
|
POST
|
For what it's worth, in case it helps you figure out any similar expressions, this is one that I'm using right now, and it's been working just fine in my web map: var Due1 = Date($feature.Followup1);
var Due2 = Date($feature.Followup2);
if(IsEmpty($feature.Followup2)){
if(DateDiff(Today(), Due1, 'days')>=0){
var TimeColour = 'Yellow';
}
else {
var TimeColour = 'Blue'
}
}
else if(DateDiff(Today(), Due2, 'days')>=0){
var TimeColour = 'Red';
}
else {
var TimeColour = 'Yellow'
}
if($feature.Override != 'None'){
var Colour = $feature.Override;
}
else if(IsEmpty($feature.Abated)){
var Colour = TimeColour;
}
else {
var Colour = 'Green';
}
return $feature.Category + Colour Workflow: A code violation is recorded, and a due date is set. If the violation is not abated in that timeframe, another warning is given and a second due date is set. A citation is issued if there's still no resolution by that date. Due dates can be adjusted as needed depending on the situation. Need: Newly recorded violations show up on the map as blue. After they pass the first due date, they turn yellow. After they pass the second due date, they turn red. Once abated, they turn green. Arcade explanation: If there's no second due date set yet, then it checks if today is before or after the first due date, setting the colour to blue (normal) or yellow (past due). Otherwise, if a second due date is set, it checks if today is before or after that deadline, setting the colour to yellow (past due) or red (outstanding). These expressions set one variable, TimeColour. Then it checks if there's a status override. If there is, the colour is set to that override, ignoring the above variable. Otherwise, it checks if there's an abatement date recorded (the violation has been resolved). If not, then the symbol colour is set to the above TimeColour variable. If there is, the colour is set to green. Lastly, in addition to the colour that was calculated out, the expression returns the violation category as well. The overall result is 20 possible combinations (5 categories, each with 4 possible colours). This can probably be simplified (I could start with the check for the override, for example), but it should give you an idea of a more elaborate setup of date-based arcade expressions, should you decide to get a little fancy. Happy coding!
... View more
07-13-2018
12:34 PM
|
2
|
4
|
1252
|
|
POST
|
For that you would want to insert an else if statement. I haven't done any calculations based on time yet myself, but something like this ought to work, or at least get you close: var Edited = Date($feature.EditDate);
if(DateDiff(Now(), Edited, 'hours')<=2){
var Status = 'New';
}
else if(DateDiff(Today(), Edited, 'days')>=0){
var Status = 'Old';
}
else {
var Status = 'Current'
}
return Status This will check first if the time is within 2 hours. If not, it will check if the time is 1 or more days old. Lastly, if neither condition is true (which should only be the case if the days match and it's more than 2 hours old), it defaults to "Current". (As an aside: Why is there no code parser specifically for Arcade? Or am I missing something?)
... View more
07-13-2018
12:13 PM
|
1
|
7
|
3352
|
|
POST
|
NOTE: I'm just barely learning Arcade myself right now, so please take this example with a large grain of salt, but DateDiff() was something I used for symbolizing data based on dates. I think something like this ought to put you in the right direction. var Edited = Date($feature.Edited); if(DateDiff(Today(), Edited, 'days')>=1){ var Status = 'Old'; } else { var Status = 'Current' } return Status Then when you symbolize according to type, all of your features should be broken down as either Old or Current.
... View more
07-12-2018
03:20 PM
|
3
|
10
|
3352
|
|
POST
|
I published a hosted feature service of code violations and, after a few days and lots of reading, managed to figure out how to get the time conversions between Mountain and UTC lined up so that the correct dates were displayed. My workflow has been to add new records to a local geodatabase (because that preserves the subtype-based default values), and then append them to the hosted feature service. Doing so automatically added 6 hours to the date, and there were no issues with the incorrect date displaying in the webmap popup. Now, when I append, no hours are being added, meaning all dates are being entered as 12:00 AM, so that when the webmap subtracts 6 hours to display in my local time zone, it's the wrong date again. Did something get changed to the way DateTime fields are handled when features are appended to a hosted feature service? This worked just fine up until recently. I tried updating ArcGIS Pro, but that didn't change anything.
... View more
07-11-2018
08:47 AM
|
2
|
7
|
5377
|
|
POST
|
The way the statement is written, your first else case is 0, when it needs to be the next if() statement. Basically, it reads as: if culvert type is CSP then int(${InvertSedimentRating}*2 else 0 ----- the function stops here, because that is a full statement. Anything else after this in the same calculation either isn't evaluated or just plain breaks. In order to nest your if() statements, the next if() needs to take the place of the preceding if()'s else case. Simply remove the "0)," from the first if() in your calculation, and close up the parentheses at the end: if(selected(${CulvertType},'C.S.P'),int(${InvertSedimentRating}*2),if(selected(${CulvertType},'H.D.P.E'),int(${InvertSedimentRating}*3.2),0)) if culvert type is CSP then int(${InvertSedimentRating}*2 else if culvert type is HDPE then int(${InvertSedimentRating}*3.2 else 0
... View more
07-05-2018
08:38 AM
|
7
|
1
|
25522
|
|
POST
|
There are a few calculations that will work with repeats. It sounds like you'll want to use a max() calculation for each repeat's final score, which should be simple enough. Check out these resources for details and information on max() and similar functions: Repeats: Aggregate Functions Release notes for version 2.1 (scroll to Repeated Aggregate Functions for a better description and a simple example table) Formulas (according to the examples here, min() and max() can be used on either a single field from a repeat, or for multiple different fields, in case that sounds like something you may need)
... View more
07-02-2018
09:32 AM
|
1
|
0
|
1624
|
|
POST
|
It depends on how you want it to work. This nested if/then statement will simply go in order, and stop when it reaches a true argument or the final else clause ('NULL'), so it will only ever return a single result. For example, if you select both 'Spans Full Channel & Banks' and 'moderate', then this statement will only return the value 1, because that's what comes first, and no else clause is checked for after that. If that's the behavior you want, then this will work just fine. Otherwise, you'll need one or more complex calculations depending on what you want it do.
... View more
07-02-2018
09:11 AM
|
2
|
2
|
1624
|
|
POST
|
There might be a more elegant solution to this, but this will work: start by adding 15 more questions, all hidden and null. Each of those hidden questions will have a calculation like if(selected(${Q1}, 'no'), '1', '0'). Then you have one more field that adds each of those together. Note that hidden types are treated as text, so you should use the int() function to treat their values as numbers in the calculation! type name calculation bind::esri:fieldType select_one yes_no Q1 hidden Q1Boolean if(selected(${Q1}, 'no'), '1', '0') null select_one yes_no Q2 hidden Q2Boolean if(selected(${Q2}, 'no'), '1', '0') null select_one yes_no Q3 hidden Q3Boolean if(selected(${Q3}, 'no'), '1', '0') null select_one yes_no Q4 hidden Q4Boolean if(selected(${Q4}, 'no'), '1', '0') null text TotalNo int(${Q1Boolean}) + int(${Q2Boolean}) + int(${Q3Boolean}) + int(${Q4Boolean})
... View more
06-27-2018
07:28 AM
|
1
|
0
|
880
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-05-2019 01:45 PM | |
| 2 | 03-26-2019 01:54 PM | |
| 1 | 02-21-2020 11:18 AM | |
| 2 | 02-06-2019 07:25 AM | |
| 2 | 07-11-2018 08:47 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-26-2021
12:04 AM
|