POST
|
The full screen button on the map widget doesn't work to exit full screen - nothing at all happens when it's clicked while in full screen mode (doesn't exit full screen, and nothing logged to the console). Pressing Esc does nothing. Is the ExB team aware of this? The extent navigation, measure, select, basemap, and layer list buttons also do nothing while in full screen mode. @TonghuiMing
... View more
01-31-2024
07:23 AM
|
2
|
8
|
667
|
POST
|
It's probably all the empty field names. Hard to say without seeing the actual CSV.
... View more
01-21-2024
03:45 PM
|
0
|
0
|
418
|
POST
|
Hi, I see two issues right away: There are no features in the addFeatures payload. You must pass an array of features to be added. addFeatures does not accept a 'where' parameter. You need to query your hosted (ArcGIS Online) feature layer, then pass those features to the 'features' parameter of the addFeatures payload. If you're wanting to do this in chunks, the chunks would be best handled on the query; in other words, query 2000 records and add them, then query the next 2000 and add those, etc. If you have attachments, those will need to be handled separately. But this should move your features over in 2000-feature chunks: import requests
import json
source_service_url = ""
destination_service_url = ""
batch_size = 2000
offset = 0
while True:
query_url = f"{source_service_url}/query"
query_params = {
"f": "json",
"where": "1=1", # Change if you want to specify which features to query from source
"outFields": "*",
"resultOffset": offset,
"resultRecordCount": batch_size,
"token": agoltoken
}
query_response = requests.get(query_url, params=query_params)
features = query_response.json().get("features")
if not features:
break # no more features to process
add_url = f"{destination_service_url}/addFeatures"
add_params = {
"f": "json",
"features": json.dumps(features),
"token": portaltoken
}
add_response = requests.post(add_url, data=add_params)
offset += batch_size
... View more
01-21-2024
01:59 PM
|
0
|
5
|
484
|
POST
|
This should work for you, or hopefully put you on the right track. The code below will delete ALL features in your service in 2000-record chunks, unless you modify the where_clause variable to specify only certain features. Use with caution. You may also want to look at Truncate (Feature Layer)—ArcGIS REST APIs | ArcGIS Developers if you are truly trying to delete every feature. import requests
feature_layer_url = "https://<your_server_url>/arcgis/rest/services/<some_feature_service>/FeatureServer/0"
where_clause = "1=1" # this will grab all features, or you can replace with a different where clause. The objectid chunks will be handled later.
batch_size = 2000
while True:
query_url = f"{feature_layer_url}/query?where={where_clause}&returnIdsOnly=true&f=json&token={portaltoken}"
query_result = requests.get(query_url).json()
object_ids = query_result.get("objectIds", [])
if not object_ids:
break # No more features to delete
for i in range(0, len(object_ids), batch_size):
batch_ids = object_ids[i:i + batch_size]
where_clause_with_ids = f"{where_clause} AND OBJECTID >= {min(batch_ids)} AND OBJECTID <= {max(batch_ids)}"
delete_params = {
'where': where_clause_with_ids,
'f': 'json',
'rollbackOnFailure': True,
'token': portaltoken
}
response = requests.post(f"{feature_layer_url}/deleteFeatures", data=delete_params)
delete_result = response.json()
if 'deleteResults' in delete_result:
deleted_features = delete_result['deleteResults']
for feature in deleted_features:
if 'success' in feature and feature['success']:
print(f"Deleted feature with objectId {feature['objectId']}")
else:
print(f"Failed to delete feature with objectId {feature['objectId']}")
else:
print(f"Error deleting features. Response: {delete_result}")
... View more
01-19-2024
01:47 PM
|
0
|
0
|
272
|
POST
|
Hi Adam, It's not clear to me what element type you're working with, but perhaps this will put you on the right track. I wrote an expression that checks your two conditions, then changes the background color of a list item if both conditions are met, and also adds the text ALERT to the item. var DateTieIn = $datapoint.DateTieIn;
var GISStatus = $datapoint.GISStatus;
var moreThanTenDays;
var alert;
var alertText;
IIf(DateDiff(NOW(), DateTieIn, "days") > 10,
moreThanTenDays = true,
moreThanTenDays = false
);
IIf(moreThanTenDays == true && GISStatus != "Mapped in GIS",
alert = true,
alert = false
);
IIf(alert, alertText = 'ALERT', alertText = null);
return {
textColor: '',
backgroundColor: IIf(alert, 'red', 'white'),
separatorColor:'',
selectionColor: '',
selectionTextColor: '',
attributes: {alertText:alertText}
} The result looks like this: Here's how the Line item template is configured:
... View more
01-18-2024
11:42 AM
|
1
|
1
|
248
|
IDEA
|
We need to be able to select a large number of records in the Table widget (for example, after applying a filter in the Table widget, we want to select all the features that meet the filter). Currently, holding down Shift while clicking records does the same thing as holding down CTRL, meaning each record must be clicked individually, which isn't practical for hundreds of records. We would like to be able to select a record, scroll down, hold Shift, and click another record, selecting all records between the clicked rows, just like ArcGIS Pro, Excel, and the Attribute Table widget in WAB.
... View more
01-11-2024
09:55 AM
|
8
|
0
|
254
|
POST
|
Thanks Doug. I think the filters might be our best option here. From my testing, the only way to make the views in the offline area match the web map again is to update the map area, then have the user delete the map area from their device and re-download -- not ideal for workers in the field. I appreciate your help.
... View more
12-11-2023
02:02 PM
|
1
|
0
|
233
|
POST
|
I have a web map with five hosted feature layer views (all pulling from the same parent) representing different inspection statuses (pending, in progress, completed, etc.). This map is being used for offline field collection using map areas defined on the web map item. When edits are made to the inspection status and the offline area is synced on the device, the hosted feature layer view filter apparently fails to apply to exclude the previous value. For example, when changing from "pending" to "completed", points show for both statuses: Before edit, we have one feature at this location with status "pending": After changing the status to "completed" and syncing the offline map area, we now have two points at the same location, showing both statuses: Any ideas how to resolve?
... View more
12-08-2023
01:23 PM
|
0
|
2
|
334
|
POST
|
Oh shoot, I deleted my response because it looked like you had solved your issue already by the time I posted it. So here it is again for posterity: var unitNumber = $feature.UNIT_NUMBER
var hasValue
IIF(IsEmpty(unitNumber), hasValue="N", hasValue="Y")
return hasValue
... View more
12-01-2023
12:17 PM
|
0
|
0
|
795
|
POST
|
In an AGOL notebook, you can just use gis=GIS("home"). In fact, that might be preferred over hardcoded credentials. This way, credentials aren't exposed, and if you change your password, you don't have to edit your Notebook code. That said, I think the bug that is discussed in the link I sent is probably not relevant in an AGOL Notebook anyway. Seems to be limited to Pro 3.1/Python API 2.2.0.3. But I could be wrong about that.
... View more
12-01-2023
12:05 PM
|
3
|
1
|
404
|
IDEA
|
Make the Query widget execute when Enter is pressed after entering a query term, instead of needing to click "Apply". This is a minor complaint, but also seems like an easy fix to make it match the behavior of the Query widget in WAB.
... View more
12-01-2023
12:00 PM
|
10
|
0
|
212
|
POST
|
There's a thread on this that might be of interest: Please ensure gssapi is installed - Esri Community But an easy fix might be to just use gis = GIS("pro") instead.
... View more
12-01-2023
11:48 AM
|
0
|
3
|
419
|
POST
|
FYI to all, the functionality to open a popup on search results (or from any widget-initiated selection: query, list, etc.) was included with the last AGOL update. It's a setting in the Map widget ("Show popup upon feature selection"). However, there's a bug that causes the popup to be blank if the feature service was published from Pro (instead of directly in AGOL): BUG-000162942 for ArcGIS Experience Builder (esri.com) @EricPescatore @AvaPatterson
... View more
11-27-2023
10:32 AM
|
1
|
1
|
565
|
POST
|
Thanks @TonghuiMing - so for the time being, all layers must be in Web Mercator projection if using an Esri basemap, if one wishes to use this feature?
... View more
11-17-2023
08:23 AM
|
0
|
0
|
626
|
POST
|
The new "Show popup upon feature selection" in the Map widget doesn't seem to be working properly. I have a map with valid popup configurations that display properly when I open the experience and click on a feature: However, if I search for any feature, the popup shows blank: Furthermore, now I can't see the popup for any feature in any layer, even ones I haven't searched on, until I refresh. Showing the popup on feature selection breaks the popups for the entire experience until it's refreshed. This isn't limited to the search widget. Here's a brand-new session where I'm selecting from the Query widget: It's not limited to one layer; it happens on all layers. I even tried spinning up a new experience and got the same behavior. Has anyone else come across this? Any thoughts, ExB team?
... View more
11-16-2023
07:32 PM
|
0
|
10
|
782
|
Title | Kudos | Posted |
---|---|---|
1 | Friday | |
1 | Friday | |
6 | 3 weeks ago | |
1 | 02-08-2024 06:15 PM | |
2 | 01-31-2024 07:23 AM |
Online Status |
Offline
|
Date Last Visited |
Monday
|