|
POST
|
ArcGIS Pro 2.2.4 Repo steps below. Add a feature class to map, symbolize by unique values. In the "Field 1" dropdown, set a custom expression using Arcade. I simply concatenated 2 text fields using ", ". I dont' think the expression matters though, just so your using it Add map to a layout, set up a simple map series Expand the legend item in the layout, select the feature class where you set the unique value symbology expression. In the Element Pane, check "only show features visible in the map extent". In the dropdown under that you can select either option "within map frame" or "within map series". The legend does not update, all features in the above feature class are shown, (not filtered by map frame extent) this is the issue. If you remove the custom expression from the symbology in #2 above, everything works as expected
... View more
11-19-2018
08:55 AM
|
0
|
1
|
839
|
|
POST
|
The hosted feature service I'm attempting to dump was generated from survey123 connect. After wasting hours last Friday dealing with globalid values not being properly dumped via REST API and CopyFeatures_Management tool, I just decided to do this the quick way today. Simply login to portal, Export the entire database to FGDB. And, like magic, the local FGDB contains all globalid and parentglobalid values. Now, I can just loop over the various tables and build my exported Excel file like I want. Sure, it would be nice to just dump via REST API so one doesn't have to continually login/dump to FGDB/extract, ect... but the process only takes 2 minutes vs. hours trying to figure out how to do it via the REST API. Our fixed price contracts don't support learning curves very well thanks everyone.
... View more
08-27-2018
08:18 AM
|
0
|
1
|
4062
|
|
POST
|
Am I missing something here? Is there a way to dump a feature service layer using the REST API where all fields are copied verbatim? Do I have to decode the JSON string from the returned featureSet and manually build a feature class?
... View more
08-24-2018
05:13 PM
|
0
|
1
|
4062
|
|
POST
|
Can a featureSet be input to the feature class to feature class tool?
... View more
08-24-2018
04:30 PM
|
0
|
3
|
4062
|
|
POST
|
fields = "*" where = "objectid > 0" gdbfc = os.path.join(localgdb,"intercept_" + layerName +"_"+ str(dtstr)) query = "/query?where={}&outFields={}&returnGeometry=true&f=json&token={}".format(where, fields, token) fsURL = baseURL + layerID + query fs = arcpy.FeatureSet() fs.load(fsURL) arcpy.CopyFeatures_management(fs, gdbfc) the resulting feature class doesn't contain any globalid values, (doesnt' even contain the field) but I can see them in the featureSet. Any pointers on how to include the original globalid values? They are used for relationships and are important.
... View more
08-24-2018
01:13 PM
|
0
|
9
|
5353
|
|
BLOG
|
I do something similar; default when survey123 form is submitted is already_emailed = NO. I just run the .py via task scheduler, kick out an email with a PDF report, then set already_emailed = YES via REST API. Here's some pseudo code, (no code bashing please ) def gentoken(username, password, referer, expiration=5): query_dict = {'username': username, 'password': password, 'expiration': str(expiration), 'client': 'referer', 'referer': referer, 'f': 'json'} tokenUrl = "https://ourportal.com/portal/sharing/rest/generateToken" tokenResponse = urllib.urlopen(tokenUrl, urllib.urlencode(query_dict)) token = json.loads(tokenResponse.read()) if "token" not in token: print token['messages'] exit() else: # Return the token to the function which called for it return token['token'] def applyUpdates(featureList,accessToken): #returns json string of POST reply payload = {'updates': json.dumps(featureList), 'token': accessToken, 'useGlobalIds': 'true', 'f': 'json'} query_string = urllib.urlencode(payload) q = "/applyEdits" url = baseURL + layerID + q req = urllib2.Request(url,query_string) resp = urllib2.urlopen(req) return json.loads(resp.read()) #URL of hosted feature service baseURL = 'https://ourportal.com/server/rest/services/Hosted/service_9ca0ddc438704f38970558c39a245ef1/FeatureServer/' #layer id in feature service we want to work with layerID = '0' #REST query string where = '"already_emailed" = ' + "'NO'" #REST query fields fields = '*' #lets get a token token = gentoken(USERNAME, PASSWORD, REFER) #construct REST query query = "/query?where={}&outFields={}&returnGeometry=true&f=json&token={}".format(where, fields, token) fsURL = baseURL + layerID + query fs = arcpy.FeatureSet() #load json string from server into feature set fs.load(fsURL) #convert json string from server into py dictionary pDict = json.loads(fs.JSON) #unecessary, but lets load our edited feat dict to a new list to send back to server newFeatList = [] for feat in pDict['features']: #returns list of features newDict = {} newDict['geometry'] = feat['geometry'] glid = feat['attributes']['globalid'] oid = feat['attributes']['objectid'] newDict['attributes']={'globalid':glid,'objectid':oid,'already_emailed':'YES'} #editing already_emailed here newFeatList.append(newDict)
... View more
07-31-2018
10:52 AM
|
0
|
0
|
18578
|
|
POST
|
type name label required relevant begin repeat freq_plot Freq Plots integer quad_id Quad ID yes begin repeat freq_plot_species Species List string-length(string(${quad_id}))>0 select_one species species_name Sci Name yes select_one livedead live_dead Live or Dead yes end repeat end repeat Basic nested repeat as shown above. Here's the survey form. The first record, Quad ID 1, has 2 inner repeat records, sp1-live and sp2-dead hence why you see the 2 of 2 count on the inner-repeat. This is the behavior one would expect. This is Quad ID: 2, the 2nd record. Here's a screenshot immediately after entering the Quad ID value. Notice how the inner-repeat is already pre-populated with 2 blank records. If the previous record, (Quad ID: 1) would of had 3 inner-repeat records, then this record would of also had 3 blank inner-repeat records and so forth. The biggest issue is when you arrow < to previous outer repeat records then try to navigate through the inner repeat records. You get validation errors because the blanks are not meeting the field required. After more testing, turns out that these blank records are ONLY created when you have a formula in the relevant column, as shown in the table at the top of this post. If that relevant formula is removed, then the blank records are not created. This is the same behavior in S123 Connect, S123 Windows, Android and iOS, all the latest versions. ESRI, is this expected or is this a bug? thanks.
... View more
07-31-2018
08:20 AM
|
2
|
10
|
5235
|
|
POST
|
Is there any way to skip a repeat entirely on a report template if the repeat record count is 0 ? thanks.
... View more
07-27-2018
07:55 AM
|
0
|
1
|
526
|
|
POST
|
I want to use an if condition to skip a question if the value of the question is Null, field type in Survey123 Connect is select_one. ${if select_one != "None"} ${if select_one != "Null"} ${if select_one != ""} Is this supported? thanks.
... View more
07-27-2018
07:47 AM
|
0
|
1
|
1297
|
|
POST
|
Same here, utcOffset isn't working. We have ArcGIS enterprise, survey was created/published using survey123 Connect. Trying to set utcOffset on a dateTime question so the output reports don't print UTC time, which is confusing to field crews reviewing the recently submitted data because it causes the date to sometimes be +1 day since PST is UTC-8.
... View more
07-27-2018
07:35 AM
|
0
|
0
|
1852
|
|
POST
|
type name label readonly calculation select_one shrub_species sp1 select species begin repeat shrub_intercepts enter intercepts text shrub_species selected shrub species yes ${sp1} integer int_start_cm start CM integer int_end_cm end CM end repeat Surveyors don't want to continually select a shrub_species inside the repeat each time they advance the repeat. They want select it 1 time (outside the repeat), then set multiple int_start_cm / int_end_cm values inside the repeat. Everything works as-expected until they want to switch the select_one shrub_species in the top dropdown box. If you back arrow < to the previously entered repeat records, they display the currently selected sp1 value, not the value that was selected when they were added. Luckily, after submitting and syncing the data, the database displays the correctly selected sp1 value. Anyone have a workaround so that field staff can page backward through the repeat and see what sp1 value was set?
... View more
04-19-2018
01:53 PM
|
0
|
10
|
5197
|
|
POST
|
Confirmed on my end also. 1) I had a survey with start/end fields, tried to edit a different survey question and re-publish; result was the timeInterval error. 2) deleted the start/end fields, republished successfully. The re-publish wipped out the data due to schema changes, so now I had a feat. service with no data. 3) I then added the start/end fields back into the survey and re-published again; successful. So I have the start/end fields in the survey now, odd how the issue happens sometimes, not others.
... View more
03-09-2018
08:46 AM
|
0
|
0
|
4081
|
|
POST
|
I've done more troubleshooting since my post a couple of weeks ago. It seems to be a problem with repeats, and not anything to do with the underlying form xls file. I had a working, existing survey that was published to Portal/Server 10.6, the feat. service did not contain any data, it was blank. The survey consisted of 2 repeats, each with 2 text fields, nothing overly complicated. I then tried to add a single text entry outside of the repeats, republish, then encountered the timeinterval error. I had to delete the survey, form, service and folder from portal and start over. I first tried publishing a survey with just the repeats, same timeinterval error. I deleted everything and started re-publishing the survey one group at a time, every attempt to re-publish was successful. Every group of questions that were published were NOT repeats. I then added the 2 repeats, republished and everything worked. Really strange behavior and will likely be difficult to repro. But seems to be related to repeats, and re-publishing (editing) existing features services. Jon - Did your survey have atleast 1 repeat in it?
... View more
03-02-2018
09:40 AM
|
1
|
4
|
4081
|
|
POST
|
after a day of trial/error with attribute rules, I just discovered they are NOT enforced on downloaded maps in Collector. Since they are applied at the database level, you don't get the validation error until you sync the offline data. Even worse is that since the db won't allow the features to be written (validation errors) the violating records are forever gone. Maybe you can dump them with iTunes from the runtime gdb, not sure. Glad I discovered this before deploying on a real project. Another gripe is that after attribute rules are added in ArcGIS Pro 2.1.1 you cannot work with the enterprise gdb in ArcMap any longer since it doesn't have the ability to work with attribute rules. Bummer. A new Collector update, that recognizes Arcade expressions is in dire need. Then, validation rules could be applied at the app level.
... View more
02-28-2018
02:02 PM
|
2
|
0
|
2640
|
|
POST
|
ArcGIS Pro 2.1, attribute rule, calculation contains this expression: Text(Now(), 'ddd D MMM Y') This gets inserted into the features attribute table, text field: Wed 28 Feb Y I also tried this expression: Text(Now(), 'ddd D MMM yyyy') This was the result: Wed 28 Feb yyyy Here's the workaround (messy): var fir = Text(Now(), 'ddd D MMM'); var sec = Text(Year(Now())); var arr = [fir,sec]; return Concatenate(arr,' ')
... View more
02-28-2018
11:09 AM
|
1
|
6
|
10662
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 2 | 06-19-2026 05:33 AM | |
| 1 | 05-02-2024 04:44 PM | |
| 1 | 11-04-2025 11:45 AM | |
| 1 | 10-31-2025 06:53 AM |
| Online Status |
Online
|
| Date Last Visited |
10 hours ago
|