POST
|
It's very common for people to "update" a layer by overwriting it, going through the entire sharing / publishing process over again. That's what I mean by "republish". Did that happen? What's the layer URL?
... View more
a week ago
|
0
|
1
|
79
|
POST
|
Some are multi-widget with a single expression, others are using multiple expressions, but derived from a single source. The trick is to make sure that your data expression includes a GlobalID or ObjectID that you can use to filter other things, even if they don't use the same expression.
... View more
a week ago
|
1
|
1
|
71
|
POST
|
GroupBy is meant to give you numeric statistics, but your Contest_ID field is a string. Also your grouping field and the calculated field are the same name. Try changing the field name for the "max" to something else. It's not really clear to me what this data expression is for. You're replacing specific strings with letter codes, but then you're grouping them. What is the grouping for? Are you trying to find the number of occurrences of each? You'd need COUNT instead of MAX. Also, if you're just recoding your strings, you can get rid of the entire intermediate featureset completely. GroupBy allows you to use a SQL expression for the grouping field, too! And you can use SQL wildcards with LIKE to shorten up your conditions, too. Getting rid of a for-loop and using a SQL-based function like GroupBy will improve your expression's execution time, too. var fs = FeatureSetByPortalItem(
Portal("https://.maps.arcgis.com"),
// portal item id
"178eb292ce436450b85dc249bd3069741",
0,
['Contest_title'],
false
);
var sql = `CASE
WHEN Contest_title LIKE 'President%REP%' THEN 'A'
WHEN Contest_title LIKE 'President%DEM%' THEN 'B'
WHEN Contest_title LIKE 'Attorney%REP%' THEN 'C'
-- and so on --
ELSE 'Unsatisfactory'
END`
return GroupBy(
fs,
{name: 'Contest_ID', expression: sql},
{name: 'Contest_ID_Count', expression: '1', statistic: 'COUNT'}
)
... View more
a week ago
|
0
|
0
|
117
|
POST
|
At the very least, you can manually set the style to match the indicator. If you inspect the indicator styles and copy them all, you can get pretty close. The text size won't be responsive, but you can set it to something pretty big. <p style="display:flex; flex-direction:column; flex-shrink:1; flex:1 1 auto; font-size:72px; justify-content:center; margin-bottom:1.5rem; margin-left:1.5rem; margin-right:1.5rem; margin-top:1.5rem; overflow:hidden; text-align:center; border-color:#dfdfdf; box-sizing:border-box; color:4a4a4a; font-weight:600; line-height:normal; stroke-width:2">No Data</p> Just copy and past that HTML into your No Data formatting (be sure to click "source" first), and you'll be pretty close. On the left, an indicator, on the right, formatted "no data" text with the above HTML.
... View more
a week ago
|
1
|
2
|
87
|
POST
|
Has the layer been republished / overwritten lately? That seems like an odd error message to suddenly appear. Any chance the layer is public?
... View more
a week ago
|
0
|
3
|
94
|
POST
|
return Iif(
DateDiff(Now(), $feature['deploy_date'], 'days') > 8,
'Older',
'Deployed Recently'
) Using DateDiff together with Now and the deployment date field, you can get your features categorized the way you want. Arcade can't control the color directly, but you can configure your symbology categories to achieve the effect.
... View more
2 weeks ago
|
3
|
0
|
107
|
POST
|
Building on @SteveCole , once you have an array of items, use the function Concatenate to turn the array into a single string. This avoids having an extra line break at the end. return Concatenate(
Split($feature['hazards'], ','),
'\n'
) Then again, if your items are broken up by commas, you could just use Replace. return Replace($feature['hazards'], ',', '\n') You could also use Replace to swap the underscores for spaces. var spaced = Replace($feature['hazards'], '_', ' ')
return Replace(spaced, ',', '\n')
... View more
2 weeks ago
|
2
|
0
|
94
|
POST
|
For me, absolutely, but that's because I'm using python for lots of other things, and I've got half a dozen different python envs. If I don't specify which, it just uses the base env, which won't have the modules I need. It's worth nothing that I primarily use the ArcGIS Python API, not ArcPy, so it's a little easier to use in Linux. Been a while since I tried ArcPy in Linux, but you can download arcpy through the Esri conda channel. Authentication is different w/o Pro installed. EarthData has a neat approach using Wine: https://www.earthdata.nasa.gov/learn/gis/gis-how-tos/run-arcpy-on-arcgis-linux
... View more
2 weeks ago
|
0
|
1
|
130
|
POST
|
Curious! So, are you certain they're being skipped, as opposed to erroring out? And the script(s) being skipped aren't consistent? I have had scripts that worked fine as a bat file and separate python files, but would fail in the Task Scheduler. Sometimes the Task Scheduler showed an error, sometimes it claimed the script exited successfully. It wasn't always clear why, unfortunately. The data involved in our scripts changed daily, and sometimes it was an unexpected datatype conflict between source and destination databases, or the ArcGIS Python API and Pandas implementing datetime values in conflicting ways. May not be the case for your scripts, though. Do you have any logging going on? I would try starting each script with something like import logging
logging.basicConfig(
filename = 'some-log-file.log',
level = logging.DEBUG
)
logging.debug('Starting some script') That would at least confirm if the scripts are starting at all. To answer your other question about alternatives: I got really tired of issues like these, and reworked my scripts so that they would run on a lightweight Linux machine, then added the scripts to the machine's crontab to run at set times. I don't know what your scripts look like and how feasible such a thing would be, but it was absolutely worth the effort. Haven't had a problem since.
... View more
2 weeks ago
|
0
|
3
|
151
|
POST
|
What does the bat file look like? I never used ArcMap, but with Pro, you need to activate the conda environment first, then call the python file, so your bat file should include another line for that. Esri's docs suggest using a built-in propy.bat script rather than calling python directly. https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/using-conda-with-arcgis-pro.htm
... View more
2 weeks ago
|
0
|
8
|
182
|
POST
|
More information about the task would be helpful. You can automate all sorts of things, but not everything. It sounds like you're trying to set the map extent, but wanting it to replicate human interaction?
... View more
2 weeks ago
|
0
|
1
|
96
|
POST
|
Unfortunately, no. Arcade can't be used to access the other properties of a label class. The best you can do is create separate label classes for each year and manually configure the color of each. Tedious, but gets the end result you want.
... View more
2 weeks ago
|
1
|
1
|
98
|
POST
|
I recently had to downgrade the urllib3 package to get my ArcGIS Python API to work correctly. Did you update your Python env recently?
... View more
2 weeks ago
|
1
|
1
|
157
|
POST
|
This kind of thing comes up pretty regularly in posts here. I'm assuming the overwrite is to update the data, yes? This doesn't help you identify the specific problem you're seeing, but avoid overwrites unless absolutely necessary. Lots of things can break that way. At the very least, consider a truncate/append, where the AGOL feature layers are emptied out, and new data loaded. This leaves all the layer schema and settings untouched. A step further is to compare the source and destination data and identify which specific rows changed, then selectively apply edits where needed. It's more work to set up, but if the source data sees relatively low edit volume, it can definitely be worth it. I presented on it a couple years ago, you might find some python in here that could help: https://github.com/jdcarls2/ilgisa-2022/blob/main/hosted-copy/hosted-copy.ipynb
... View more
2 weeks ago
|
1
|
0
|
107
|
POST
|
We have interactive dashboards that are entirely data expressions. Try just defining the ObjectID as an integer? ObjectID fields and integers can still work together in a filter. Or you might try using the GlobalID as an esriFieldTypeGUID, which is what we usually do. Which charts show the "no elements" message? Both? How are the charts themselves configured? Are they grouped values?
... View more
2 weeks ago
|
1
|
5
|
132
|
Title | Kudos | Posted |
---|---|---|
1 | Thursday | |
1 | a month ago | |
1 | Wednesday | |
1 | Tuesday | |
1 | Saturday |
Online Status |
Offline
|
Date Last Visited |
Thursday
|