POST
|
That would work but I would prefer not to do that as it would mess us the survey and other maps.
... View more
02-17-2021
05:15 AM
|
0
|
0
|
81
|
POST
|
I am using Dynamic Text in Data Driven Pages to pull an attribute for units. The codes are LF, SF, GAL, SY and the descriptions would then be Linear Foot, Square Foot, Gallon, Square Yard. By default, the text that is returned is the description. Is there a way to get it to show the domain code instead? I've tried using the Domain and Domaincode funtions but haven't had any luck. Thanks!
... View more
02-16-2021
02:43 PM
|
0
|
3
|
140
|
POST
|
Figured it out! One of my rows had an empty PopupInfo field so it was failing because there weren't enough indexes. So yes you were right that the index was only a length of 1. I only selected the features with the PopupInfo filled out and it worked. Thanks!
... View more
09-25-2020
06:48 AM
|
0
|
1
|
153
|
POST
|
Figured it out! One of my rows had an empty PopupInfo field so it was failing because there weren't enough indexes. So yes you were right that the index was only a length of 1. I only selected the features with the PopupInfo filled out and it worked. Thanks!
... View more
09-25-2020
06:48 AM
|
0
|
0
|
153
|
POST
|
Hi everyone, I am trying to use the .split() function on a string and keep gettings errors. The field is the popup information from a converted KMZ and is called PopupInfo. The code I am trying to use is: !PopupInfo!.split("<br>")[14] but am getting Error 000539 and is saying "IndexError: list index out of range". The calculation will run fine if 14 is swapped out for 0 or -1 to get the first or last section. I am counting 27 sections if it is being broken at each "<br>". I've tried finding and replacing all of the <br>'s with a dash or underscore but the calculation still fails with anything other than 0 or -1. The text string that I am trying to pull from looks something like this: US20 EB <br> <br> FID 57 <br> RampDate 9/30/2013 <br> RouteId 161 <br> RouteName US20 EB <br> TownId 314 <br> TownName Watertown <br> IsMissingR False <br> IsMissingS False <br> IsMissingC True <br> InspNotes <br> DistrictId 6 <br> LegacyID 335 <br> status 6 <br> StatusText Deficient <br> DstrctRank 669 <br> deficient -1 <br> GlobalID {C4BBAA58-9DFE-4953-AC74-FF3448002388} <br> created_us <br> created_da <br> last_edite DAVID.DINOCCO <br> last_edi_1 10/17/2017 <br> ReInspectn 0 <br> AssetID <br> ProgNotes <br> Rank 669 I would be trying to field calc a different field with the LegacyID from this PopupInfo. Is there a problem with this string that is causing the index errors? The lengths at both ends are never the same so I can't trim off the ends. Thanks for the help! Tim
... View more
09-24-2020
02:28 PM
|
0
|
5
|
212
|
POST
|
Has there been any update on this? The beta dashboard popups seem to be handling the formatting like line breaks better than the regular ones but are still reporting undefined for attribute expressions.
... View more
09-11-2020
09:31 AM
|
0
|
1
|
94
|
POST
|
Hey Xander, Another followup question for you regarding the related records. How would I access another field from that row in the related record? I would still want to reference the row with the max date but would want to grab a name field associated with that record instead. Thanks! Tim
... View more
09-10-2020
01:53 PM
|
0
|
1
|
145
|
POST
|
That worked! Thank you! I used this to set up a months since last submission which looks like this: // first read out the ID of the Feature1 var id = $feature.STATE_NAME; // access the table Feature2 var tbl = FeatureSetByName($map, 'Registration Submissions'); // create a sql expression to query on ID var sql = "STATE_NAME = '" + ID + "'"; // filter the table using the sql expression var related_data = Filter(tbl, sql); // validate if you have any related records if (Count(related_data)>0) { // get the max date and format the result var maxepoch = Max(tbl, 'SubmissionDate'); var maxdate = Date(maxepoch); var endDate = Now(); var diff = DateDiff(endDate,maxdate,'months'); var age = Round(diff,0) return age } else { // in case you don't have related records // define what to return return "No Previous Submissions"; } That all look correct? Another related question, is there a way to symbolize the polygons by this length since last submission? I thought I saw that the FeatureSetByName function isn't available for the symbology custom expression. Thanks again, Tim
... View more
09-08-2020
04:25 PM
|
0
|
3
|
145
|
POST
|
What would be the best way to reformat the months to go from 0-11 and not 1-12? Is that something I need to set in ArcMap or Pro before publishing the feature service?
... View more
09-08-2020
03:14 PM
|
0
|
6
|
414
|
POST
|
Hey Xander, Thanks for getting back so quick. I tried that out and got an error that says, " Execution Error: unable to find a number expression in pattern: MM/DD/Y". I was able to set up another one that worked but it seems to be returning the wrong date. The related record has a date of 9/8/2020 but the expression is returning 8/8/2020. I tried it with a few others and it seemed to always be off by a month. This was the code: // first read out the ID of the Feature1 var id = $feature.STATE_NAME; // access the table Feature2 var tbl = FeatureSetByName($map, 'Registration Submissions'); // create a sql expression to query on ID var sql = "STATE_NAME = '" + ID + "'"; // filter the table using the sql expression var related_data = Filter(tbl, sql); // initiate a variable to hold the result var result = Max(tbl, 'SubmissionDate'); var relateddate = Date(result) var formatteddate= Month(relateddate)+"/"+Day(relateddate)+"/"+Year(relateddate) // return the result return formatteddate; I'm guessing it's something to do with one of the Date functions. If I have it return 'result', it gives me the number 1599609600000. I checked this on epochconverter.com and it came back as 9/8/2020 at 9:40:47 PM GMT. I tried returning relateddate and that came back as 08 Sep 2020 08:00:00 pm so the date is correct at that point but gets skewed by the Month() function. Any idea of what might be throwing it off by a month? Is there another way instead of the Month, Day, and Year function to format the date? Thanks! Tim
... View more
09-08-2020
02:49 PM
|
0
|
9
|
414
|
Online Status |
Offline
|
Date Last Visited |
02-17-2021
09:51 AM
|