|
IDEA
|
Below is a a Python script that will overwrite the configuration of the "target" experience using the configuration from the "source" experience. In my testing, I created a very basic experience as my "target", and overwrote it using the config from one of our developed experiences as the "source". After running the script, the "target" experience looked, behaved, and had all the components of the "source" experience. This may be a way of easily updating one experience with another and not having to move URLs around. Note: This does not update the "target" experience title, summary, description or any of its item properties. !!! USE CAUTION AND BACKUP ANY ITEMS BEFORE TESTING !!! In the code below, the following lines will need to be updated: 6, 7, 8, 11, 13, 15 (optional) import arcgis
import json
from pathlib import Path
# portal variables
PORTAL_URL = r'...url...'
PORTAL_USER = '...user name...'
PORTAL_PASSWORD = '...user password...'
# source experience item id (load from)
ITEM_ID_SOURCE = '...item id...'
# target experience item id (load into)
ITEM_ID_TARGET = '...item id...'
# optional --- writes source experience config to file
WRITE_SOURCE_CONFIG = True
if __name__ == '__main__':
# connect to portal
portal = arcgis.GIS(url=PORTAL_URL,
username=PORTAL_USER,
password=PORTAL_PASSWORD)
# get source experience item
item_source = portal.content.get(itemid=ITEM_ID_SOURCE)
# get target experience item
item_target = portal.content.get(itemid=ITEM_ID_TARGET)
# get source config
config_source = item_source.get_data()
# write source config?
if WRITE_SOURCE_CONFIG:
# construct config file path
root_dir = Path(Path(__file__).parent).resolve()
config_path = root_dir / f'config__{ITEM_ID_SOURCE}.json'
# write source config
with open(file=config_path, mode='w') as f:
print(f'Attempting to write item "{ITEM_ID_SOURCE}" config')
json.dump(obj=config_source, fp=f, indent=4)
print(f'Successfully created "{config_path}"')
print('-' * 50)
# update target item config
print(f'Attempting to update item "{ITEM_ID_TARGET}" config')
item_target.update(data=config_source)
print(f'Successfully updated item "{ITEM_ID_TARGET}" config')
print('-' * 50)
... View more
02-26-2026
01:23 PM
|
0
|
0
|
791
|
|
IDEA
|
@DougBrowning Yep, I could see that being an issue, one of which the idea hopes to resolve...have a somewhat static URL for an app, but be able to import/load/swap a configuration from another experience.
... View more
02-19-2026
06:43 AM
|
0
|
0
|
832
|
|
IDEA
|
@Zach-Williams This is more for the hosted AGO version of ExB. With Developer Edition, it's a lot easier to manipulate or copy/paste/replace the downloaded app with an existing one.
... View more
02-19-2026
06:32 AM
|
0
|
0
|
840
|
|
IDEA
|
It'd be nice to have the Esri provided icons that are made available in Button elements be made available within an Image element, or a new "Icon" element. The Esri provided icons provide nice contextual graphics, but are only available in limited functionality.
... View more
02-18-2026
05:01 PM
|
2
|
0
|
185
|
|
IDEA
|
It's be nice to have the ability to easily swap or overwrite an experience with the config of another. For example, if testing or developing a new experience, when complete, I'd like to have the ability to overwrite an existing experience config with the new one. This way I don't have to notify users of a new URL.
... View more
02-18-2026
04:58 PM
|
6
|
6
|
861
|
|
POST
|
Came across this post when looking for a similar workflow. I wanted to mention now that ExB supports creating feature sets from Arcade, you can create a feature set on the fly using Arcade to return distinct "categories" based on field values from your target feature layer. The resulting Arcade feature set can then be used as the selecting list using the same workflow as above. Below is a sample Arcade script I used to generate a feature set that was then used as a selecting list: // set portal
var p = Portal('...{url}...');
// set item id
var item_id = '...{item id}...'
// set layer index
var layer_index = 0
// set desired field
var field = '...{field name}...'
// set where clause
var where = field + ' IS NOT NULL'
// set order by clause
var order_by = field + ' ASC'
// set base feature set
var fs_1 = FeatureSetByPortalItem(p, item_id, layer_index, [field], false);
// set distinct feature set
var fs_2 = OrderBy(Distinct(Filter(fs_1, where), field), order_by)
// return distinct feature set
return fs_2
... View more
02-03-2026
09:59 AM
|
1
|
0
|
1622
|
|
POST
|
This is what I have been using. I was hoping there was a method using the Python API that could replace this workflow.
... View more
01-05-2026
05:59 AM
|
0
|
0
|
504
|
|
POST
|
Is there a way to disable/enable a Server primary site admin account using the Python API? I don't see anything in admin.security, am I looking in the right place?
... View more
12-12-2025
02:52 PM
|
0
|
2
|
717
|
|
POST
|
There are some limitations to the FeatureLayerManager.truncate method, which are shown below (REST docs found here), one of them being sync enabled feature layers.
... View more
12-09-2025
09:31 AM
|
0
|
0
|
587
|
|
POST
|
I can see scenarios where you may just want to delete certain features using a where clause. For example, we have a hosted feature layer that stores point-in-time data and has data written to it every 5 minutes. Once the data is written, it's not going to change, so there's not really a point in deleting all rows and replacing them. However, at some point we do want to trim the data within the feature layer, so we use delete_features to delete those feature older than a certain date. The graph below shows the item size for thisparticular feature layer. It's still growing over time, but at a much slower rate...possibly (likely?) because we aren't removing ALL features when it's updated, but rather deleting features once a day based on the date value. If you're going to be replacing ALL features within a hosted feature layer, I think this makes the case to use truncate over delete_features.
... View more
12-09-2025
09:01 AM
|
0
|
0
|
1273
|
|
POST
|
Yea, when we're doing anything with internal datasets (ex: file gdb or enterprise gdb), we use truncate over deleting features. Makes sense to use it with feature layers too.
... View more
12-09-2025
08:26 AM
|
0
|
4
|
1283
|
|
POST
|
I was aware of the truncate method within the FeatureLayerManager and was hesitant to use it due to its restrictions, outlined here. However, I did change one of our scripts to use this rather than FeatureLayer.delete_features to see if it provided any change. And...it seems to have done the job! I made the change to this script around 11:30AM, and by about 1PM the feature layer showed a substantial reduction in item size, see first graph below. The item size looks to have remained consistent since making the change to use FeatureLayerManager.truncate. In the second graph below is one of our hosted feature layers that's still using FeatureLayer.delete_features. You can see this feature layer continues to grow in item size. I won't speculate on what's being done behind the scenes by Esri, but it does seem that using the truncate method flushes/resets/removes something that the delete_features method is not. Example 1: Hosted feature layer changed to using FeatureLayerManager.truncate at around 11:30AM on 12/8/2025. Substantial drop in item size noticed around 1PM and item size looks to remain consistent. Example 2: Hosted feature layer still using FeatureLayer.delete_features and the item size continues to grow.
... View more
12-09-2025
07:06 AM
|
1
|
6
|
1289
|
|
POST
|
I was curious about the same, so I created a script that pulls the size of some of our hosted feature layers. It includes a mix of those that we update via publishing a file geodatabase, and those that we update via deleting/adding features. The feature layers that are published from a file geodatabase do NOT show increased item size. Those that are updated using delete/add features DO show increased item size even though the number of features is NOT increasing proportional to their shown size. We ARE seeing this ballooning reflected in our credit usage. Below are some charts displaying what we're seeing. Example 1: This feature layer is updated every 30 minutes using delete/add features. On Friday afternoon the size of the feature layer was about 17-18MB. It is now showing about 45MB. The number of features and populated fields in this feature layer remains relatively consistent. Example 2: This feature layer is updated every 2 minutes using delete/add features. On Friday afternoon the size of the feature layer was about 2MB. It is now showing about 7MB. The number of features in this feature layer does oscillate but is likely never above 40 features. Example 3: This feature layer is updated once a day by publishing a file geodatabase. The size remains consistent. Example 4: Below is snapshot of our available credits near the end of the day for the past few days (the DateValue field is set to noon UTC for our time zone). The "CreditsUsed" field is calculated from the previous day's value. We first noticed one of our hosted feature layers ballooning in size on Friday, 12/5/2025. Once we noticed it, I changed this feature layer to be updated via publishing a file geodatabase. You can see the noticeable bump in credit usage on Thursday, 12/4, and Friday, 12/5. Once the feature layer in question was changed to be updated via a file geodatabase, the credit usage remained steady on Saturday, 12/6 and Sunday, 12/7. I would really like an explanation from someone at Esri as to why this is happening (apologies to the Esri staff I tagged, you all showed up as top collaborators). @EmilyGeo @RussRoberts @George_Thompson
... View more
12-08-2025
08:01 AM
|
0
|
1
|
666
|
|
POST
|
We have a feature layer that over the past couple days has ballooned in size with no reasonable explanation I can find. This feature layer contains approximately 11k line features and less than 10 fields. Every 10 minutes the feature layer has all rows deleted and replaced using a feature set and the Python API. This morning I manually overwrote the feature layer, and the item size was around 5MB. A few hours later, the item has ballooned in size to 250MB!?! The feature layer does NOT have editing enabled, no associated views, no extra indexes, does NOT have optimize layer drawing enabled, and no attachments. Is there any reasonable explanation for why this feature layer continues to balloon in size?
... View more
12-05-2025
11:29 AM
|
0
|
14
|
2089
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-21-2025 09:46 AM | |
| 1 | 02-03-2026 09:59 AM | |
| 1 | 03-02-2026 11:02 AM | |
| 6 | 02-18-2026 04:58 PM | |
| 2 | 02-18-2026 05:01 PM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|