|
POST
|
Hi, This is possible using ArcGIS API for Python. You can write a script to query features using an expression and delete the attachments of those selected features only while leaving the rest of attachments in the feature service. Below is a sample code that you can use. Keep in mind that you need to modify some parameters in the script according to the settings in your own data. You should be careful when deleting attachments, as this operation is permanent and cannot be undone. It's a good practice to make a backup of your data before performing any deletion operations, just in case you accidentally delete something you didn't mean to. from arcgis.gis import GIS
import arcgis
from arcgis.features import FeatureLayerCollection
gis = GIS("https://www.arcgis.com", "USERNAME", "PASSWORD") #Replace your username and password
featureService = gis.content.get('ITEM_ID')
flayer=featureService.layers[0] #You may need to change layer id from 0 to your own layer number
whereclause = "QUERY_EXPRESSION" #for example "status ='done'" queries features where the value in the "status" field is "done"
for feature in flayer.query(where=whereclause):
f_oid=feature.attributes.get("OBJECTID") #You need to replace OBJECTID with the name of the objectid field in your dataset.
att_list=flayer.attachments.get_list(oid=f_oid)
if att_list:
for att in att_list:
att_id= att['id']
flayer.attachments.delete(f_oid,att_id)
print(f"Attachments were deleted for feature {f_oid}")
else:
print(f"No attachments found for feature {f_oid}") Some documentation that might be helpful for reference: https://developers.arcgis.com/python/guide/using-attachments-with-feature-layers/ https://developers.arcgis.com/python/api-reference/arcgis.features.managers.html Best, MJ
... View more
04-14-2023
07:35 AM
|
4
|
5
|
6366
|
|
POST
|
Hi @TH1, It seems like this issue was introduced with the February release. A defect has been logged against this behavior (BUG-000156413). In the meantime, you can work around this issue by manually adding "Elevation 3D Layer" to the "typeKeywords" in the JSON of the item using ArcGIS Online Assistant. Please keep in mind that ArcGIS Online Assistant is not a supported product. Best, MJ
... View more
03-08-2023
06:32 AM
|
1
|
0
|
1126
|
|
POST
|
Hi @AaronWorthley1 , if you are doing a 1:1 join and saving the results as hosted feature layer view, as long as the target layer has a GlobalID field and has attachments enabled, attachments on the target layer will be preserved. Please note that this only applies to 1:1 joins and currently attachments are not preserved in 1:M joins.
... View more
01-31-2023
07:21 AM
|
0
|
2
|
1985
|
|
POST
|
Hi @jacbro I tested a few tools in ArcGIS Pro 3.0.3 and I can confirm that attachments were maintained when I had "Maintain Attachments" enabled in the environment settings. Can you please provide more details about your workflow and the tools that you are seeing this issue with? Thanks, MJ
... View more
01-31-2023
05:48 AM
|
0
|
2
|
1793
|
|
POST
|
Hi @kmsmikrud Both of these bugs have been fixed in Pro 3.0. So everything should work as expected and you should not have the issues you were experiencing in previous versions.
... View more
01-31-2023
05:45 AM
|
0
|
0
|
1793
|
|
POST
|
Hi @edward33, This is a limitation of the clone_items() method and Experience Builder items are not supported with it at the moment. From what I've seen, both versions of ArcGIS Online Assistant also cannot properly copy an Experience Builder app. While the item for the Experience is cloned in the target organization, the copy of the app still references the maps, apps, and other underlying layers used in the original Experience, as this workflow (similar to the Python API clone_items() method) only copy the app item and not other items that are used in this app in different ways or forms. Until this functionality is added to ArcGIS API for Python in future releases, one possible workaround is to clone Web Maps and/or Feature Services and/or apps used in the Experience using clone_items() method, and then rebuild the Experience Builder app in the target organization. Best, MJ
... View more
01-30-2023
10:46 AM
|
1
|
0
|
10391
|
|
POST
|
Hi, This seems to be a known limitation. According to the documentation, Classify Data is not available with the Color and Size, Types and Size, or Predominant Category and Size styles. Refer to the Note section in ArcGIS Online: Style numbers - Counts and Amounts (Size) https://doc.arcgis.com/en/arcgis-online/reference/style-numbers.htm A bug (BUG-000127981) has been logged against this behavior that is closed as a known limit, and an enhancement (ENH-000110103) that was submitted for this capability is not currently on the road map. Best, MJ
... View more
01-30-2023
09:30 AM
|
1
|
1
|
3183
|
|
POST
|
Hi @FOMELC01 the error seems to be happening in Map Viewer if a publicly shared hosted feature layer has the following configuration: What access do anonymous editors (not signed in) have? Only add new features, if allowed above (requires editor tracking) As you noticed, it's only reproducible in Map Viewer and you should be able to edit the features in Map Viewer Classic as expected. Unsharing the layer with public or changing the setting for "What access do anonymous editors (not signed in) have?" to "The same as signed in editors" will also allow you to edit features in Map Viewer. We are currently investigating this issue to determine the best next steps to address this issue. Best, MJ
... View more
01-20-2023
08:09 AM
|
0
|
0
|
791
|
|
POST
|
Hi @DavidBenítez In Survey123 3.16 a change was made to the name of the notes fields created in Survey123 Connect when downloading surveys published from the web designer. The form title, survey description, and image header are now written to a note question in the XLSForm named generated_note_form_title when publishing a survey. This is mentioned in our What's new documentation as well. This change should resolve the issues you had with the header image not showing up in web app when changing the language. Best, MJ
... View more
12-06-2022
07:35 AM
|
0
|
0
|
3810
|
|
IDEA
|
Hi @ZenMasterZeke and @MCameron, Just wanted to share some additional info regarding this post. In Survey123 3.16 a change was made to the name of the notes fields created in Survey123 Connect when downloading surveys published from the web designer. The form title, survey description, and image header are now written to a note question in the XLSForm named generated_note_form_title when publishing a survey. This is mentioned in our What's new documentation as well. If you would like to customize title, description and image header, you can add a note question called "generated_note_form_title" to your XLS form. All the best, MJ
... View more
12-06-2022
07:33 AM
|
0
|
0
|
3786
|
|
POST
|
Hi @PhanindraDulam1, You can use AGOLUsageReports in arcgis.gis.admin module to generate different reports : applications: Creates a usage report for all registered application logins for a given organization on ArcGIS Online. gis.admin.usage_reports.applications(start_time=None, time_frame='week') credit : Creates a Report as a Panda’s dataframe or CSV file for a given time range for ArcGIS Online Organizations. gis.admin.usage_reports.credit(start_time=None, time_frame='week', export=False) users: Creates a usage report for all users for a given organization on ArcGIS Online. gis.admin.usage_reports.users(start_time=None, time_frame='week') For more details, please see our documentation: https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#agolusagereports Best, MJ
... View more
12-01-2022
11:53 AM
|
0
|
0
|
1426
|
|
POST
|
Hi @PeterGamberg1 I know this is an old post but I just wanted to share some info for reference. To create a credit report for users in your ArcGIS Online organization you can create a credit report in ArcGIS Online or similarly in ArcGIS API for Python using gis.admin.usage_reports.credit. You can specify the start time or the timeframe for your report if you need to: credit(start_time=None, time_frame='week', export=False) start_time: optional datetime, the time to step back from. If None, the current time is used. time_frame: >optional string, is the timeframe report to create. Allowed values: today, week (default), 14days, 30days, 60days, 90days, 6months, year export: optional boolean, if True, a csv is generated from the request. If False, a Panda’s dataframe is returned For more details, please see our documentation: https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#agolusagereports Best, MJ
... View more
12-01-2022
11:45 AM
|
0
|
0
|
2891
|
|
POST
|
Hi @LindseyDanforth_Boulder , This is by design since the usage report tracks all the usernames who used services, including non-organization users who used publicly shared services. Also, just to clarify, the usage_reports tool reports "usage" for users, if you need to create a credit report for users in your org, you can use gis.admin.usage_reports.credit. For more details, please see our documentation: https://developers.arcgis.com/python/api-reference/arcgis.gis.admin.html#agolusagereports Best, MJ
... View more
12-01-2022
08:00 AM
|
0
|
0
|
2522
|
|
POST
|
Hi @JosephKerski The stakeholder view gets automatically created when you share your survey results from Survey123 website. However, this specific view layer is created for a specific purpose which is controlling who can access the results of your survey. However, you can use this view for other purposes. Besides, as it's mentioned in the documentation you linked in your previous post here, you can always create other views if you need from the item details page of your survey's hosted feature layer. Can you please explain why creating a view layer manually didn't work? Were you getting any errors? Thanks, MJ
... View more
10-19-2022
06:06 AM
|
0
|
0
|
548
|
|
POST
|
Hi @jbauer I'm able to reproduce the issue you are experiencing with a survey I published with your XLS form. It seems like the error is reproduced when a repeat with relevant expression has a dynamic repeat count. For example, there is a repeat in your survey called "activity_prod". This repeat has a relevant expression "selected(${co2_activity_type},'Producer')" and the repeat count is determined by another question ("${num_prod}"). Removing the calculation for the repeat_count and replacing it with a number resolves the issue but it may not be a viable workaround. On the other hand, removing the relevant expression for the begin repeat and adding it to the questions inside the repeat which also resolves the error might be a better workaround for you. I recommend reaching out to Technichal Support to report this issue and log a defect against it if needed. Best, MJ
... View more
09-06-2022
07:17 AM
|
1
|
0
|
2733
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-26-2025 12:07 PM | |
| 1 | 05-03-2024 09:47 AM | |
| 1 | 02-17-2022 12:55 PM | |
| 2 | 05-03-2024 09:47 AM | |
| 2 | 06-09-2022 06:34 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|