POST
|
Hi Gregory This may or may not help you sorry. Our scripts are split into modules for reuse so I can give you everything. Attached is the base script which should help you with the workflow we used (without too much of the detail sorry) I also wrote this a few years back so there may be netter ways of achieving this now with the ArcGIS api for python Callum
... View more
12-18-2019
03:21 PM
|
0
|
1
|
911
|
POST
|
Hi Gregory Sorry I missed your post. Are you still having issues? Do you still want the code? Callum
... View more
12-16-2019
12:15 PM
|
1
|
1
|
911
|
POST
|
Thanks Xander. I appreciate your help on this one. Yes your workaround works for me although I agree it is not ideal. I guess there is a issue with the parser that is changing "IS" to "ISS" cheers Callum
... View more
05-08-2019
03:02 PM
|
0
|
5
|
2482
|
POST
|
After Further investigation it seems that the null values are the issue. The query "audit_complete <> 'DNE'" does not pick up null values? Dont know why but null is not DNE so those null records should be picked up. So I have tried to update my Filter query as follows: var servicePointsFilter = Filter(servicePointsIntersect, "audit_complete <> 'DNE' OR audit_complete IS NULL"); However this causes a further issue where the arcade parser somehow interprets the "IS" statement as "ISS" ??? See the error message below Not sure why is interprets the "IS" as "ISS" cheers Callum
... View more
05-07-2019
07:03 PM
|
0
|
7
|
2482
|
POST
|
Hi I am in the process of creating a attribute rule and are having some issues notably with the Filter function in arcade. The attribute rule is assigned to a polygon feature class (Terminal Serving Areas) so that when a polygon is created or edited it calculates the number of features form another point feature class (Service Points) that intersect the polygon and writes the count to a field on the polygon. I can get this to work easily with the following arcade: var servicePoints = FeatureSetByName($datastore, "gs_service_point", ["audit_complete"], True); var servicePointsIntersect = Intersects(servicePoints, $feature); return (Count(servicePointsIntersect)) However the Service Points have a filed (audit_complete) and I want to be able to filter the Service Points so that only certain "types" are counted. In my case the filter is where audit_complete <> 'DNE' So I change my arcade to include the filter: var servicePoints = FeatureSetByName($datastore, "gs_service_point", ["audit_complete"], True); var servicePointsIntersect = Intersects(servicePoints, $feature); var servicePointsFilter = Filter(servicePointsIntersect, "audit_complete <> 'DNE'"); return (Count(servicePointsFilter)) But I cannot get it to work. No matter what I do it always returns zero! I have tried everything I can think of!! Does anyone have any idea how to get the filter to work? It may be worth noting that the audit_comple filed contains a lot of null values but this should not impact on the query.. cheers Callum
... View more
05-07-2019
04:18 PM
|
0
|
8
|
2860
|
BLOG
|
Hi James I would also like to see this avaliable in Enterprise. Regards Callum
... View more
09-04-2018
07:03 PM
|
4
|
0
|
17630
|
POST
|
Hello We have recently upgraded our enterprise environment from 10.3.1 to 10.6. Due to the way the portal was initial configured the Portal directories (excluding "content") are located on the server at C:\arcgisportal. This folder includes the following subfolders: backup db dsdata index logs pgsql_9.6.3 temp I want to move these subfolders to a new drive (E:\) we have configured on the server E:\arcgisportal. I know how to move the db, index, logs and temp folder via the portaladmin directory but I can see no way to move the other 3 subfolders : backup dsdata pgsql_9.6.3. Is it possible to move these subfolders via the portaladmin directory or via some other means without breaking the portal or should they be left alone and kept in their original location. I see there is a "portal-config.properties" file on the portal server at C:\Program Files\ArcGIS\Portal\etc which looks like this: # # At 10.2.1 you must use the Adminstrative API for Portal to add or update configuration properties. # This file is used internally by the Portal. # PLEASE DO NOT CHANGE THIS FILE DIRECTLY. USE THE PORTAL ADMIN DIRECTORY INSTEAD. # the 'nodeagent' section is used to configure the Portal daemon/service nodeagent.jmx.port=7099 # the 'dir' section is used to configure the directories required for Portal dir.data=C:/arcgisportal/ I am guessing the the locvation of these folders has something to do withn the dir.data property in this file but I am unsure if I should be messing with it as I can see no way of changing this property via the portaladmin directory? Any suggestions or help appreciated. cheers Callum
... View more
06-26-2018
04:21 PM
|
0
|
5
|
3412
|
POST
|
I have figured out what the issue was here and why I could get the GlobalID for some featureclasses/tables and not others. Consider the following code snippet. fc = 'featureclass'
insertFields = ['field1', 'field2']
with arcpy.da.InsertCursor(fc, insertFields) as insertCursor:
row = ['Blah', 'Blah']
objectid = insertCursor.insertRow(row)
searchFields = ['OBJECTID', 'GLOBALID']
whereClause = 'OBJECTID = {0}'.format(objectid)
with arcpy.da.SearchCursor(fc, searchFields, whereClause) as searchCursor:
for row in searchCursor:
globalid = row[searchFields.index('GLOBALID')] For a featureclass I am trying to extract the GlobalID from the record that has just been inserted. This works for some of my featureclasses/tables but not others. After some testing (and hair pulling!) I have identified for the above code to work and return the globalid the featureclass has to participate in a composite relationship class with the globalid as the primary key. If the featureclass does not participate in a composite relationship class then the search cursor will not be able to find the previously inserted record. If anyone has a better method of getting the globalid for a record that has just been inserted I would be interested in hearing from you. cheers Callum
... View more
02-11-2018
02:59 PM
|
1
|
0
|
1237
|
POST
|
Hi Is there any way using a arcpy.da.insertCursor for it to return a GlobalIID rather than the OBJECTID? My script is adding data to a number of feature classes and tables that are all tied together with relationship classes using GlobalID's and keys. The purpose of my script is to normalise some data in a table that has been captured with Survey123. Currently my workflow is as follows 1. Create a edit session 2. Create InsertCursors for all my tables. 3. Loop through my input adding records to the necessary tables. After Each insert I get the OBJECTID and then create a SearchCursor on the same table with the OBJECTID as the where. I then extract the GlobalID from the record in the search cursor. 4. delete Insert Cursors 5. Stop editing and Commit. This approach works for some of my tables but not for others? My guess there is some kind if issue / bug when triggering a search cursor on a table that is in edit mode on a record that has just been added and not committed? Is there a better approach for this to get a GlobalID from a record that has just been inserted? I don't want to have to stop editing after each insert to create a SearchCursor get the GlobalID as this will potentially be slow. cheers Callum
... View more
02-06-2018
06:48 PM
|
0
|
1
|
1746
|
POST
|
Thanks Mike Yes that is essentially where I am heading. We are not going to use related tables we are just going to have a flat feature class with lots of fields for all of the questions and then we will post process it into a related table so that there is 1 record for all of the Y/N questions (i.e. Normalise the structure). Our survey is configured with a submission_url so the survey data is stored directly in our enterprise gdb so no need to download. The python script can be scheduled on a regular basis to run against the enterprise gdb. Thanks for your help and ideas. Much appreciated. Regards Callum
... View more
12-05-2017
10:51 AM
|
0
|
0
|
286
|
POST
|
Thanks James I was thinking the question part might be able to be handled with hidden fields and default values but I was struggling as to how to incorporate the related table when not really using repeats. Perhaps food for thought for your development team as we would find functionality like this quite useful especially for surveys that have lots of Y/N type questions (by lots I mean hundreds) which makes the table large in terms of the number of columns. We prefer to use feature services and the submission_url for our surveys and we are finding that we often go over the 500 column limit for enterprise geodatabases. Regards Callum
... View more
12-04-2017
02:30 PM
|
0
|
2
|
286
|
POST
|
Hi James Yes I want 1 related table with all of the additional questions. I don't want the related table to have a column for every question the related table should have only two columns "Question" and "Answer". The answers are either Y/N or Maybe. My survey has hundreds of questions so rather than having hundreds of columns I would rather have hundreds of records in a related table. If you think this is possible I would appreciate a small example? cheers Callum
... View more
12-04-2017
01:42 PM
|
0
|
4
|
686
|
POST
|
Hi Mike I've played around with you suggestions and I don't think it is possible to achieve what I want. I want my related table to look like this: Question Answer Is it corroded? Y Is it underground? N Is it broken? N Does it need maintenance? Y So depending on what is selected in the main question the user will get presented with a number of questions. Then the questions and the answer for these will be populated in a related table linked back to the featureclass which will have the main question. I think this may be a "Bridge to Far" with Survey 123 at the moment? cheers Callum
... View more
12-04-2017
11:31 AM
|
0
|
6
|
686
|
POST
|
Thanks Mike I will have a play around with your ideas and see if I can get it to work the way I want. Will let you know how I get on cheers Callum
... View more
11-28-2017
12:53 PM
|
0
|
8
|
686
|
POST
|
Thanks Mike for that. With your approach would each question be a record in the related table? or would there be 3 related tables with multiple columns depending on the number of questions? I am trying to get a solution with 1 related table and each question is a record in that table.. cheers Callum
... View more
11-28-2017
12:35 PM
|
0
|
1
|
686
|
Title | Kudos | Posted |
---|---|---|
1 | 02-11-2018 02:59 PM | |
1 | 11-03-2016 01:09 PM | |
1 | 12-16-2019 12:15 PM | |
4 | 09-04-2018 07:03 PM | |
5 | 08-23-2017 01:28 PM |
Online Status |
Offline
|
Date Last Visited |
Friday
|