POST
|
The logical endpoint of this is the geoprocessing modules feature, which allow you to bundle your Python toolbox(es) as members of a standard Python package. There's a very big learning curve and you're forced to deal with Python's perpetually half-baked build systems but your reward is a fully managed, easy to read bundle of code that you can load into different environments, complete with proper dependency management. And the toolboxes are accessed just like system tools which is pretty slick. Just watch out for using them in web tools, that's a whole other can of worms.
... View more
Thursday
|
2
|
0
|
30
|
POST
|
The field calculator doesn't use any types that are pass-by-reference, so you have to return what you want like so: def reclass(Date, DateType):
if (DateType == "D"):
return Date[3:5]
return None
... View more
2 weeks ago
|
2
|
1
|
249
|
IDEA
|
Our team has a project that requires all attachments have a very specific name based on a field in the parent feature. We currently "solve" this using a Python cursor to ensure all attachments are named correctly. Not only does this take several hours to chew through the table but every renamed attachment creates a new record in the archive table, effectively doubling the size of every attachment. Enforcing the proper name via Arcade at the database level would solve all of these issues.
... View more
3 weeks ago
|
0
|
0
|
79
|
POST
|
I haven't found a way to do this in Survey123 alone, but if your survey data is backed by an Enterprise Geodatabase you can use Attribute Rules to flip the read-only switch on submission
... View more
3 weeks ago
|
1
|
0
|
139
|
POST
|
It looks like the "modified" property on each service item aligns with when it was last updated. You'll get some false positives for items that were edited after the service was overwritten but this should be good enough for most purposes. Take another look at Carsten's code for tips on getting the date out in a readable format.
... View more
a month ago
|
0
|
0
|
63
|
POST
|
I ran into a similar issue in the past and unfortunately there wasn't a workaround. To my understanding FeatureSetByName must take name of the table as a string literal or it'll create an error. I have to assume there's some hacky pre-processor nonsense that goes on with this function, either way you'll just have to type out the right name for every rule. If you're writing the rule multiple times you might want a script tool that uses Add Attribute Rule to save some time. As an aside, that method of getting the max ID isn't optimal for large datasets, even with an index on the ID field. You may want to look into combining a database sequence with NextSequenceValue to get a new ID in constant time.
... View more
04-08-2024
08:45 AM
|
0
|
1
|
156
|
IDEA
|
This is symptomatic of a bigger problem, which is that everything in Field Maps works off the Smart Form definitions and the APIv4 popup definitions except for Edit Multiple which reads the APIv3 popup definitions (i.e. the "fieldInfos" object at the root of the "popupInfo"). I have a sneaking suspicion this is related to the lack of standardized multi-feature editing in the new API somehow, but either way updating Edit Multiple to use the Smart Form definition is a must, there's no reason for the editing workflows to be disjoint.
... View more
03-22-2024
08:41 AM
|
0
|
0
|
388
|
IDEA
|
Tweaking a layer based on the current datetime relative to a field in the layer is a common request in my org. Usually it's a symbol that we set using Arcade but filtering comes up too and jumping into AGOL Assistant is less than ideal.
... View more
03-20-2024
11:42 AM
|
0
|
0
|
567
|
POST
|
Is your data in an EGDB? You can write a database view that UNIONs every layer into 1 big table with a "score" field, something like: SELECT ROW_NUMBER() [OBJECTID], tbl.[LayerName], tbl.[Score], tbl.[Shape]
FROM (
SELECT 'Layer1' [LayerName], 1 [Score], Shape
FROM A.B.Layer1
UNION
SELECT 'Layer2' [LayerName], 1 [Score], Shape
FROM A.B.Layer2
) tbl You'll have to find the appropriate function to get a unique row number for your database, here's some info for SQL Server. Once the view works you can register it to the EGDB, publish it as a layer and drop that in your app for use with widgets.
... View more
02-01-2024
01:51 PM
|
0
|
0
|
289
|
POST
|
Will the changes actually remove records or just some fields? If the row count remains the same across the board, you can download the old data, make the changes, join the old data to the new data on the common key field and then field calculate the old data over to the new format. Whipping up a dummy survey to test the workflow is a good idea, you can never tell what Survey123 might do on schema changes!
... View more
02-01-2024
01:40 PM
|
0
|
1
|
302
|
POST
|
You could maybe get jagged arrays working with a ValueTable but you might run into ergonomics issues. My preferred solution is a multivalue string parameter where each value is delimited with a known character. As long as you validate each value in the updateParameters validation step you should be good to go.
... View more
01-25-2024
10:48 AM
|
0
|
0
|
205
|
POST
|
Does subclassing the tool and overriding the category work? You'd have to duplicate things like metadata between both tools but this seems like the lowest cost solution.
... View more
01-25-2024
10:33 AM
|
0
|
0
|
129
|
POST
|
If all the info you need is in the same record, the Field Calculator is the usual solution, here's an overview. If you need to work other records into each record's results, you might find something appropriate in the Analysis toolbox. If that fails, you may need to dig into arcpy and use the cursor objects to implement a custom solution.
... View more
01-11-2024
01:35 PM
|
0
|
0
|
172
|
Title | Kudos | Posted |
---|---|---|
1 | Friday | |
2 | Thursday | |
2 | 2 weeks ago | |
1 | 3 weeks ago | |
1 | 01-11-2024 12:50 PM |
Online Status |
Offline
|
Date Last Visited |
Friday
|