|
POST
|
Also, I'm not sure you can return an object like that in rules, you need to return an object with a "result" property which in turn has at least one of "attribute" or "geometry" properties. The docs have more info on this.
... View more
10-24-2024
11:26 AM
|
0
|
3
|
3240
|
|
POST
|
FeatureSetByRelationshipName doesn't use the name of the relationship class object, it uses the name of the relationship as defined by the forward or backward label in that class. You can try using that name or switching to FeatureSetByRelationshipClass if that's supported in your environment.
... View more
10-24-2024
11:21 AM
|
0
|
4
|
3243
|
|
POST
|
You can try using the "geometry" and "geometryType" parameters to add a spatial filter to your requests (docs). Assuming the service has a properly maintained spatial index and your query geometry isn't too complex this should give you a much smaller working set.
... View more
10-21-2024
11:55 AM
|
0
|
0
|
793
|
|
POST
|
Check out the format codes for the format-date function.
... View more
10-10-2024
01:27 PM
|
1
|
0
|
1901
|
|
POST
|
I was browsing this Survey123 document when I noticed the little "link" button that usually appears when you hover over a section header wasn't present. The section metadata is still present and you can create a proper link by poking through the page source (like so) but this is far less convenient than clicking a button. I make use of these sections any time I link ESRI documentation, it'd be nice if they were exposed across the board. Is this just an issue for my browser? Windows 11, Chrome 129
... View more
10-10-2024
09:13 AM
|
0
|
1
|
658
|
|
POST
|
The simplest way is to extract all your unique IDs and associated info to a CSV file, add that to your Survey's media, then use the techniques listed here to calculate the other fields. I'm almost certain this requires Connect but I highly recommend learning the full Connect workflow anyways, it'll save time in the future when your client's "basic" survey needs extra features bolted on. If you need to update that CSV data, you can either generate new files and republish the survey, or you can publish the CSV to your portal and link it to the survey for real time links between the portal data and everyone's survey. There's also ways to pull directly from a feature service, but that requires porting all your shapefile data over and it's a bit flaky when a survey is collected offline.
... View more
10-10-2024
09:09 AM
|
0
|
0
|
734
|
|
POST
|
If you have proper date fields in your data, they'll be converted into Python datetime objects when you run Calculate Field in Python3 mode. This means you can put something like this in your code block to get a decimal result: def run(start, end):
diff = end - start # creates datetime.TimeDelta object
return diff.hours + (diff.minutes / 60.0) Exercise for the reader: handle cases with null inputs.
... View more
10-10-2024
08:53 AM
|
0
|
0
|
635
|
|
IDEA
|
For persistent calculations, you can store the value in a field using Attribute Rules (as Vince mentioned) or synthesize it on demand using the Pop-up Configuration. For one-time calculations, select the rows you want then run Calculate Field on the field (right-click on the field header in the attribute table for a shortcut). That said, it would be very handy if you could right-click on individual values in either the attribute table or attribute pane to quickly select that record and launch the field calculator in one step.
... View more
10-09-2024
12:31 PM
|
0
|
0
|
1610
|
|
IDEA
|
Sounds like your local support provider was taking a nap that day: it is possible to link attachments to the appropriate Survey123 question, but you have to update the "KEYWORDS" field that's buried in the attachment table. If you're referencing EGDB data you can dig into the field in the table directly. If not (or if you want to avoid direct table editing) you can specify the KEYWORDS value for each attachment using the REST API; this sample code should point you in the right direction. That said, it would be nice if ArcGIS did a better job preserving this new field across the system, seems like it's very easy to lose it without it being obvious until it's too late.
... View more
09-27-2024
02:01 PM
|
0
|
0
|
987
|
|
POST
|
You can even do start & end in one pass, something like:
... View more
09-26-2024
09:55 AM
|
1
|
1
|
2295
|
|
POST
|
If you have to publish this to a public repository then you might want to crosspost on a dedicated Conda forum, they should have more insight into the build system than the average ESRI user. That said, if you aren't uploading to a public system then there's a much easier way to fix your issues with conda's build system: just don't use it! Here's the cliff notes on using Python's standard packaging model: Install the "build" package to the Python environment you're using for development. Grab the folder that contains your package folder ("mailbox" in the example workflow) and add: Two empty folders, "build" and "dist" An empty file named "pyproj.toml" Your README.md (and your LICENSE file if this is leaving your company's control). You don't need anything to do with a recipe folder, nor do you need a top-level directory. Fill out your pyproj.toml as per the official guides, with extra configuration for setuptools as per its guide. The key part is your [build-system] section, this specifies your build dependencies and your build system. Mine looks like: [build-system] requires = ["setuptools >= 68.2.1","wheel"] build-backend = "setuptools.build_meta" Most of the other sections should be easy to fill out, if you run into issues with your package missing key files you can try adding: [tool.setuptools.package-data] "*" = ["esri/**"] Pop open the Python Command Prompt and run python -m build "C:\path\to\mailbox". You should now have a "tar.gz" file and a "whl" file in your "dist" folder. With the command prompt open, run pip install "C:\path\to\mailbox\dist\artifact_name.whl". This will install the package to your environment. Restart Pro and ensure you can import your module and run the installed script tools. If you can import the module but the tools fail, ensure that "esri" subfolder has all the necessary files and they're included in your "whl" file -- you can crack the whl files open with 7Zip to browse their contents to check. And there you go, now you can build and deploy your packages using pip instead of conda! The one catch is dependencies: pip will get dependencies from pypi.org instead of the dedicated conda channel, so you could clobber your environment by accident. To avoid this, always check if a dependency is available on conda and then specify that exact version in your pyproj file. You don't have to specify arcpy or any ESRI-specific dependencies if you aren't publishing to a public repository as they're a part of every Pro environment. As a bonus, you now have access to packages outside of the esri conda channel if you need extra functionality.
... View more
09-19-2024
11:46 AM
|
0
|
0
|
2146
|
|
POST
|
You might be able to use the Calculate Value utility to run all the Python code you need, but I think that just overcomplicates things. You're better off writing this as a script tool. If you're not comfortable with that then hopefully someone with more Modelbuilder experience can help.
... View more
09-19-2024
11:16 AM
|
1
|
0
|
2365
|
|
POST
|
You can use Python to read the geometry field using Cursors, then extract the in-between vertices using methods on the Polyline objects the cursor returns, then use another cursor to write the results where you need it.
... View more
09-19-2024
09:27 AM
|
0
|
2
|
2378
|
|
POST
|
Make a copy of the feature class, ensure it has the same symbology as the source layer, add records which contain the values you want to symbolize, add those options to the unique values, configure the symbols, save this to a layer file, apply this layer file to the source layer, delete the copy. Boom, you're ready for future data without tampering with the production features!
... View more
09-19-2024
09:22 AM
|
0
|
0
|
1326
|
|
IDEA
|
Should already be there, right-click on empty space in the code block or expression builder.
... View more
09-18-2024
12:16 PM
|
0
|
0
|
993
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-24-2023 11:47 AM | |
| 2 | 04-09-2026 11:36 AM | |
| 1 | 09-08-2023 10:07 AM | |
| 3 | 03-26-2026 08:11 AM | |
| 2 | 03-12-2026 01:41 PM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|