POST
|
I have experienced the same issue. First time the solution was to remove domains for editor tracking fields (creator and editor fields). However, I run into same issue today and editor tracking was disabled, so there couldn't be an issue with editor tracking. After investigating further, I have found out that one of the fields which had a domain assigned, contained values which were not present in the domain. Once I have removed the domain from the field, I was able to see related features in new Collector for ArcGIS. Without any further testing, it seems that related data cannot be accessed from Collector, when there is a domain assign to a field, but some values in the field are not present in that domain. In any case, I would recommend to remove all the domains from the related table, republish the service and see what happens. If it works, you can start to add domain one by one and see which causes the issue. Generally, it could be said, that the domains are causing lot of issues in new Collector for ArcGIS. So anytime I have problems, I am trying to remove the domains, and in most cases, I find a domain which causes issues with the map.
... View more
03-17-2020
04:57 AM
|
0
|
0
|
1692
|
POST
|
Hi Brandon. I have experiencing this behaviour on insert cursor, however not on update. But it might be, because I am running cursor on points FC and not polygons. But here are my observation, maybe it helps. I am not sure if you have solved this issue. I have experienced this many times on insert cursor. I have found out that this is happening if you are opening a cursor using an edit session with a feature class which has attachments. And if feature class has attachments, you have to use the edit session to open a cursor. When running the insert cursor, all the inserted features will end up on coordinates of last inserted features. As workaround, after I insert the features, I run an update cursor which then updates the shape field with the original coordinates and it usaully works. For that to work, you will need to store the x, y coordinates in the attribute table, or somehow link the the insersted features with the source data. Another workaround, but slower one is to insert one featuere at a time, but that requires that you open an edit session, open the insert cursor, insert the feature, and close the edit session and then repeat this workflow. This could take a long time if you are inserting many records. Below is a sample code, which can prove my case. If I only run the inserst_features() function, the points will be inserted and all end up on the location of the last point. However if I also run the function update_coord(), the points will be placed at their correct position. I have tested this with feature class stored in Microsoft SQL DBMS, and also in FGDB. The issue was present in both cases. Hopefully we can get some explanation from ESRI. # -*- coding: utf-8 -*-
#!/usr/bin/python
import datetime, arcpy
sde = "c:/connection.sde"
inputFC = "test_fc"
arcpy.env.workspace = sde
def insert_features(xcoord, ycoord, number_of_features_to_insert):
now = datetime.datetime.now()
edit = arcpy.da.Editor(sde)
# Edit session is started without an undo/redo stack for versioned data
edit.startEditing(False, False)
# Start an edit operation
edit.startOperation()
fields = ['SHAPE@XY', 'insert_time', 'xcoord', 'ycoord']
cursor = arcpy.da.InsertCursor(inputFC, fields)
for i in range(0, number_of_features_to_insert):
y = ycoord + (i*10)
geometry = [xcoord, y]
print "Inserting x, y: {0}, {1}".format(xcoord, y)
cursor.insertRow([geometry, now, xcoord, y])
continue
edit.stopOperation()
# Stop the edit session and save the changes
edit.stopEditing(True)
del cursor
return
def update_coords():
edit = arcpy.da.Editor(sde)
# Edit session is started without an undo/redo stack for versioned data
edit.startEditing(True, False)
# Start an edit operation
edit.startOperation()
whereClause = None
fields = ['SHAPE@XY', 'xcoord', 'ycoord', 'objectid']
with arcpy.da.UpdateCursor(inputFC, fields, whereClause) as cursor:
for row in cursor:
print "Updating row oid: {0}".format(row[3])
row[0] = [row[1], row[2]]
cursor.updateRow(row)
edit.stopOperation()
# Stop the edit session and save the changes
edit.stopEditing(True)
del cursor
# Functions creates new points and place all points on same x coordinate,
# but increases the y coordinate by 10 for each next feature
insert_features(xcoord = 200010, ycoord = 800000, number_of_features_to_insert = 3)
# fucntion updates shape field of input feature class using,
# values in xcoord and ycoord fields.
update_coords()
... View more
11-18-2019
01:33 PM
|
0
|
0
|
1733
|
POST
|
I was informed by ESRI representative in Denmark, that hiding fields doesn’t work when publishing to Portal using ArcGIS for Server 10.6.1 Updating the server to 10.7.1 solved the problem for me. Kind regards, Martin
... View more
10-28-2019
02:51 PM
|
3
|
2
|
2812
|
POST
|
Hi. I have upgraded ArcMAP from v 10.5 to 10.7.1 yesterday. Currently I notice that update cursor is not working anymore in my scripts. I get the same error: Function or procedure does not exists. Cursor is running, but once I use the function "updateRow()" on cursor, I get this error. Here is a script sampe: sde = "path to connection file" inputFC = "my_input_fc" arcpy.env.workspace = sde whereClause = "objectid < 1000" fields = ['objectid', 'feature_id'] with arcpy.da.UpdateCursor(inputFC, fields, whereClause) as cursor: for row in cursor: row[1] = row[0] print row[0] cursor.updateRow(row) What I was able to find out is that if I am running script against FC stored in filegeodatabase, it is working correctly. However if I am running against postgresql (version 9.2) I am getting the error.
... View more
09-02-2019
09:06 AM
|
0
|
0
|
1064
|
POST
|
Hi. I am trying to get access to map object in developer console, when using a ArcGIS JavaScript Map viewer avaialable in REST API. I want to use it for example to read or modify map scale, get a current extent and other functions. However I am not able to figure out how to access the object. I could read the scale, from the "map" DOM element, but I would like to have access to the map object. I believe there is a way to do it. Thank you Martin
... View more
06-21-2019
02:23 AM
|
0
|
0
|
434
|
POST
|
Hey Robert. Do you, or maybe someone else know how to modify the string "- empty -" which is used as placeholder in input field in query widget?
... View more
06-16-2019
09:52 AM
|
0
|
1
|
1097
|
POST
|
I have setup a WEB APP on ArcGIS online and then I have downloaded it to be hosted locally on our server. I wish to change some text in danish localization to a faroese texts, which serves our purpose. I was able to change many of the texts by accessing a NLS folder for a widget I want to customize (e.g. query widget "...widgets\Query\nls\Widget_da.js" and change the texts. But some widgets do not have text strings in NLS folder, specifically "measaurement" widget. I have managed to change the lables by adding a following js code to the measurement widget js code, right before the original code starts (see attached image): require(["dojo/i18n!esri/nls/jsapi"], function(bundle) { // bundle.widgets.measurement.NLS_area_sq_kilometers = "km<sup>2</sup>"; // bundle.widgets.measurement.NLS_resultLabel = "Mlæ"; } ); However, I realize that this is probably not best solution. My questions are: Where to add a custom code like this if I wish to extend a widget. Remember, I have downloaded the code from AGOL, I am not working with WAB for developers. I would imagine that this code will change the texts for all languages not only for danish. Is there a way I can change the text only one language? Thank you Martin
... View more
06-15-2019
03:27 AM
|
0
|
4
|
1368
|
POST
|
Hi Robert. Thanks for the answer, but is there a way how to replace the icon in that directory, when the Web APP is hosted at AGOL? Martin
... View more
05-21-2019
02:57 AM
|
0
|
1
|
293
|
POST
|
I have run into a small issue. When I choose a white background for the header in WAB, the "more icon" which groups widgets for which there is no space in the header on the mobile devices is not visible, as it is white icon on a white background. I was able to upload new icons for each widget used in the webapp, in order for them to be shown on the white background, but I do not know how I can access the "more icon". The web app is hosted in AGOL, currently I do not want to download it and alter the code to host it outside of AGOL. I need to solve this in AGOL if possible. I have also looked at JSON file using AGOL Assistant, but haven't found the option there on how to change the icon. Is there any solution to this issue?
... View more
05-20-2019
12:53 PM
|
0
|
3
|
349
|
POST
|
Based on your answer I guess it should work with hiding the fields in ArcGIS Pro. I do not want to create the database view, as I changed which fields are shown or hidden quite dynamically. I am bit stuck now, hopefully someone from ESRI can give me an answer on how to solve this issue.
... View more
04-02-2019
07:46 AM
|
0
|
0
|
2812
|
POST
|
Hi. Thank you. I have done that, but the field was available in the REST endpoint. This is an answer I got from a local ESRI representative, but I doubt that this is the correct solution. I guess it should work as suggested above, or am I wrong? The suggested solution: Right workflow is to use geodatabase views: https://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-database-view.htm This way you ensure that the feature service will be based on the subset that you define with only the relevant fields. I would really appriciate your comments on this. Regards, Martin
... View more
04-02-2019
05:30 AM
|
0
|
2
|
2812
|
POST
|
Hi. Is there any way of hiding a field in a feature class when publishing to Portal via ArcGIS Pro? In other words, I want only selected fields to be available in a published service, not all which exists in feature class. Thanks, Martin
... View more
04-02-2019
02:22 AM
|
2
|
8
|
3598
|
POST
|
You can read about field map object here: FieldMappings—ArcPy classes | ArcGIS Desktop What I have done, I have create a small function where I send the 2 paramters. The first is path to Input feature class, and second is array of arrays of [field name in input FC, corresponding field in target FC]. If the names are the same, I just pass the one item in the subarray. The functions returns field mapping object, which I then use in append function. Here is a sample from the code, hope it helps. # Function which created a field mapping object
def createFieldMap(inputFC, fieldMaps):
"""
Creates a field map object use to define field mapping for tools which use fieldmaps
Args:
inputFC(string): the input feature class
fieldMaps(array): array of input / output fields.
First item is input field name, second is output field name.
If output field name is not defined it is set to same as input field
Returns:
(object): Field mapping object which can be used to define field mappings
"""
# If field out is not defined set it to the same name as field in
fms = arcpy.FieldMappings()
print ("\nCreating field map")
for fieldMap in fieldMaps:
# print ("\nProcessing field {0}".format(fieldMap[0]))
fieldIn = fieldMap[0]
fieldOut = fieldMap[0] if len(fieldMap) == 1 else fieldMap[1]
# print ("Field in {0}".format(fieldIn))
# print ("Field out {0}".format(fieldOut))
# Define field map
fm = arcpy.FieldMap()
fm.addInputField(inputFC, fieldIn)
# Set ouput field properties
fmOutputField = fm.outputField
fmOutputField.name = fieldOut
fm.outputField = fmOutputField
fms.addFieldMap(fm)
return fms fms = createFieldMap(
pathToinputFC,
[
['feature_id', 'id'], # values from input FC field "feature_id" will be appended to field in target FC with name "id"
['owner'], # the name of the field in input and target FC is save, "owner"
['liquid'] # the name of the field in input and target FC is save, "liquid"
],
)
# RUN Append command
arcpy.Append_management(
inputs=pathToinputFC,
target=targetFC,
schema_type="NO_TEST",
field_mapping = fms
)
... View more
03-28-2019
07:23 AM
|
1
|
0
|
696
|
POST
|
Hi. I am starting to use ArcGIS Pro for publishing a services to ArcGIS Server. I am publishing to Portal. The data I am publishing are stored in DBMS and published as referenced (not hosted on the hosting server). I have prepared my map in ArcGIS Pro and hid the fields which I do not want to make available in the service. However, after publishing all the fields are accessible in the service. I have never experienced this in ArcMAP. The ESRI representative for our country suggested to use CREATE DATABASE VIEW tool. However, I doubt that this is a solution. I guess there are many of you publishing services via ArcGIS Pro and hiding some of the fields. Is this working for you, or are you using a "create database view" tool to hide fields? The version of ArcGIS Pro I am using is 2.3.0 and I am publishing to Portal 10.6.1. Kind regards Martin
... View more
03-03-2019
04:17 AM
|
0
|
0
|
565
|
POST
|
Hi. I got the following errors, when trying to copy cache to ArcGIS Server map service: and after running: I have tried everything but nothing helps. The strange thing is that it used to work, but after we have updated from ArcGIS Server 10.5. to 10.61, it doesn't work. I set a permission to the folders for ArcGIS server user, I even tried to copy the cache I want to import to ArcGIS server cache directory, but to no avail. Did anybody experienced this issue? ESRI do you have an idea what might be wrong or what to check?
... View more
01-10-2019
09:56 AM
|
0
|
1
|
482
|
Title | Kudos | Posted |
---|---|---|
1 | 03-27-2018 02:50 AM | |
1 | 03-28-2019 07:23 AM | |
3 | 10-28-2019 02:51 PM | |
2 | 04-02-2019 02:22 AM | |
1 | 03-23-2018 09:21 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|