POST
|
Hey Nik There is surprisingly little on how to deal this error on the internet, but I also came across this error as well and was able to find the answer, at least for my situation. For me, this error displayed in ArcGIS Collector when I tried the view (and edit) the layer. Interestingly, were no problems displaying or editing the hosted feature layer in either the Portal webmap or ArcGIS Pro. The issue was due to trying to "enable editing" (Portal layer settings) for a hosted feature layer in which already had edit tracking fields (date/user created/edited). I ran into this situation as I wanted to overwrite or created a new version of the layer I had been using, and wanted to maintain the existing edit/create fields and dates/times as well as continuing to add new. I was able to solve this by going back into Pro and using the original featureclass, and using the "Enable Editor Tracking" tool, and populating the existing fields for date/user created/edited (and not selecting "add fields"). After publishing the new version to Portal, the "edit tracking" box on layer options was already checked and everything worked fine. Problem solved! Hope this helps you. It may not be the editor fields, but its probably something similar of an auto-created field. Test by turning off "edit tracking" within layer settings of Portal (or AGOL) and check if the error is still present. Re-test by unchecking editing in the layer settings. Hopefully you can track down the issue by process of elimination. Cheers Platform error codes—ArcGIS Runtime SDK for .NET | ArcGIS for Developers see: 3018 Geodatabase Field exists exception.
... View more
12-12-2019
11:54 AM
|
5
|
5
|
3376
|
POST
|
Figured it out - for all those that may need this solution in the future (also fixed in the original) Replace these 2 lines: insert into data.newtest_point2 (objectid) values (sde.next_rowid('data', 'newtest_point2')); With: new.objectid= sde.next_rowid('data', 'newtest_point2') Check with insert (in PgAdmin for Postgres) insert into data.newtest_point2 (shape) values ('ST_GeomFromText('POINT(-71.060316 48.432044)', 4326))
... View more
10-02-2019
06:49 AM
|
2
|
0
|
1809
|
POST
|
Related to my question here (postgres nonversioned editing - sequence vs next_rowid ) on returning the next_rowid for non-versioned Postgres database (Postgres 10.6/PostGIS 2.2), I'm trying to implement the next_row id (Next_RowID—Help | ArcGIS Desktop ) with an insert trigger, however I'm buffaloed on how to get this done. Hoping someone has done this before. When I run a basic next_rowid select in PgAdmin, I get response I'm looking for (where 'data' is the schema and 'newtest_point2' is the table) SQL: select sde.next_rowid('data', 'newtest_point2') Return: 481 Postgres documentation (Creating PostgreSQL Trigger Example ) Function: CREATE OR REPLACE FUNCTION test_trigger_func()
RETURNS trigger AS
$BODY$
BEGIN
#insert into data.newtest_point2 (objectid)
#Values (sde.next_rowid('data', 'newtest_point2'));
new.objectid= sde.next_rowid('data', 'newtest_point2')
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql Trigger: CREATE TRIGGER test_trigger
BEFORE Insert
ON newtest_point2
FOR EACH ROW
EXECUTE PROCEDURE test_trigger_func(); However my error (when adding creating points in ArcPro) : I found a somewhat similar post on another forum ( postgresql - PostGIS Trigger Function -- max stack depth reached - Stack Overflow ,) but haven't figured out the solution. Anyone have any suggestions or run into this before with implementing a insert trigger on next_rowid? Note - I thought modifying back the trigger to "update" rather than "insert" did the trick, but it only appeared to work with an existing sequence.
... View more
09-15-2019
10:58 AM
|
0
|
2
|
2111
|
POST
|
I have Postgres 10.6/PostGIS 2.2 set up with ArcGIS Desktop 10.6.1 and would like to allow feature class editing (non-versioned) of an enterprise FGDB outside of ArcDesktop (PgAdmin, dare I say - other non-ESRI products), which requires auto-incrementing the objectid. One option is to sequence the objectid, something like this. This method works great - inserts add new objectid's exactly as expected - and is easy to apply within the database. The complete lack of info on this solution is why I am so cautious. There are some internet articles (See Well's blog below) using next_rowid but almost everything (what little there is) - is using ArcGIS Desktop 10.2 and ArcSDE. CREATE SEQUENCE data.test_objectid_seq; /*creates new sequence*/ ALTER TABLE data.test ALTER COLUMN objectid set default nextval ('data.test_objectid_seq'); GRANT USAGE, SELECT ON data.test_objectid_seq TO data; /*grants usage*/ (Note – See additional information regarding use of OIDS and auto-incrementing columns from: https://www.postgresql.org/docs/current/sql-createtable.html) The second is to utilize the stored procedure via next_rowid - which is apparently the "ESRI" suggested method. This however doesn't seem to be easy to implement.. Does anyone have thoughts or experience doing this? Links I've found: Editing nonversioned geodatabase data in PostgreSQL using SQL—Help | ArcGIS Desktop Next_RowID—Help | ArcGIS Desktop What is an ObjectID?—Help | ArcGIS Desktop Auto-Incrementing ObjectID Field Outside of ArcGIS- Thomas Colson had an interesting comment around "messing with the ObjectID outside of ESRI" with a link to Christian Wells's Blog Note - I've found that the records don't actually alternate. For a brand new feature class for the first record, the sequence 1 and the ESRI block value (sde.next_rowid) =1, which there are collisions in the database. In the attached - I've previously added 419 records and then deleted all records in the table, then started re-adding points with ArcGIS Pro adds on the left, and another software on the right. If you noticed the OIDs, the ESRI objectids continued where the table left off (now at 420), while the other software (using the sequence) re-started at 1 (up to 194). So I think unless you hack the sequence (starting at a very high number) or the ESRI internal OID (adding and deleting lots of records) to get a large enough "starting" number, neither of which is really ideal of suggested for production environments, this is probably not a viable method. On to testing use of "sde.next_rowid" with an insert trigger.
... View more
09-09-2019
07:36 PM
|
0
|
0
|
1247
|
POST
|
So - I seemingly uncovered a bug with the "save as" function when using the WAB (dev-version). The work flow to this issue is as such; "Create new" WAB 2D app (Name=NewApp, ID=1) Configure app and add several random widgets Hit "save as" and give a new name (Name=MyApp, ID=2), close Delete original app (Name=NewApp, ID=1) Return to MyApp (ID=2) All icon links will be broken within MyApp itself and in the widget window Using FireBug in Firefox and inspecting element (see attachment), it clearly shows an icon reference to ID=1, even though this app is ID=2 Has anyone else experience this issue? I haven't tried it yet, but I'm guessing if I export "MyApp" the links won't work either as the reference will no longer be valid. Anyone have ideas? Note - in the attachment, the ID's are actually 12 and 13
... View more
01-20-2017
09:23 AM
|
1
|
1
|
610
|
Title | Kudos | Posted |
---|---|---|
2 | 10-02-2019 06:49 AM | |
5 | 12-12-2019 11:54 AM | |
1 | 01-20-2017 09:23 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|