|
POST
|
If you're okay with using Python outside of ArcPy, then I will give you a couple of scripts that can be used to determine the tables and views. Of course, you'll still need to modify the scripts to forward them to your views/items DB, but it should at least give you a starting point. You'd still be able to run this as a script tool in ArcGIS Pro. It uses Python to directly connect to a MS SQL database. #Output Tables
import pyodbc
def list_tables_mssql(server, database, username, password):
try:
# Connection string
conn_str = (
f"DRIVER={{ODBC Driver 17 for SQL Server}};"
f"SERVER={server};"
f"DATABASE={database};"
f"UID={username};"
f"PWD={password}"
)
# Connect to SQL Server
conn = pyodbc.connect(conn_str)
cursor = conn.cursor()
# Query to get all user-defined tables
cursor.execute("""
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
""")
tables = cursor.fetchall()
if tables:
print("Tables in the SQL Server database:")
for schema, name in tables:
print(f" - {schema}.{name}")
else:
print("No tables found in the database.")
except pyodbc.Error as e:
print(f"SQL Server error: {e}")
finally:
if conn:
conn.close()
# Example usage
if __name__ == "__main__":
list_tables_mssql(
server="localhost\\SQLEXPRESS",
database="YourDatabaseName",
username="YourUsername",
password="YourPassword"
) #Output Views
import pyodbc
def list_views_mssql(server, database, username, password):
try:
# Connection string
conn_str = (
f"DRIVER={{ODBC Driver 17 for SQL Server}};"
f"SERVER={server};"
f"DATABASE={database};"
f"UID={username};"
f"PWD={password}"
)
# Connect to the SQL Server
conn = pyodbc.connect(conn_str)
cursor = conn.cursor()
# Query to get all views in the database
cursor.execute("""
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.VIEWS
""")
views = cursor.fetchall()
if views:
print("Views in the SQL Server database:")
for schema, name in views:
print(f" - {schema}.{name}")
else:
print("No views found in the database.")
except pyodbc.Error as e:
print(f"SQL Server error: {e}")
finally:
if conn:
conn.close()
# Example usage
if __name__ == "__main__":
list_views_mssql(
server="localhost\\SQLEXPRESS",
database="YourDatabaseName",
username="YourUsername",
password="YourPassword"
)
... View more
05-18-2025
10:49 AM
|
2
|
2
|
2198
|
|
POST
|
This Esri documentation has some really good information on what settings are inherited in the view from the hosted feature layer that can and cannot be changed on the view. Per the documentation, edit settings can be configured independently on the views from the hosted feature layers they are created from. Meaning that you should be able to allow editing on the view, with it still disabled on the hosted feature layer. (Note that some additional edit settings, such as editor tracking, must be made at the hosted feature layer level. But the enable/disable editing setting itself can be changed independently on the view). This is something that I just tested with my own hosted feature layer/view in AGOL and it works fine for me. Editing is disabled in the hosted feature layer, but enabled on the view and I can add new data as well as edit existing data. Your "applyedits" response in the network traffic indicates a different problem. It appears that it is trying to add a record with the same key, which is not possible to do. For example, if ObjectID is your key field and you have a record with an ObjectID of 1. And then you try to add a new record with an ObjectID of 1, it will fail because a key with that value already exists. I've never really heard of that being a problem in AGOL though. If it's possible, it might be worth trying to enable editing on your hosted feature layer and see if you are able to add new records to it, or if you receive the same error. If you don't receive any errors, it might be worth trying to delete and re-create the view again. And if you do receive errors in the feature layer itself, then I think you have a different problem that needs to be resolved.
... View more
05-16-2025
05:37 PM
|
1
|
1
|
3434
|
|
POST
|
Actually, you can use the body::accept column to limit the file type, such as .jpg. https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformmedia.htm#ESRI_SECTION1_A2F2DA5ADD8646B99D2344DF4595CD4B
... View more
05-16-2025
10:55 AM
|
1
|
1
|
1359
|
|
POST
|
I can't really speak for why it was designed that way or if it's something that will change in future versions, but someone did create an ArcGIS Idea that I believe is asking for the same thing you are.
... View more
05-16-2025
08:20 AM
|
2
|
1
|
1420
|
|
POST
|
I thought of that option as well, but there are some additional considerations with that option, mainly if the schema changes as part of the nightly update. Here is the documentation regarding schema locking. I think both options will work in this scenario though. I should have asked if your overwriting the entire table, or just records inside of it. I might be wrong, but I don't think disabling schema locking would impact any locks at the individual record level (although, I'm not sure if you would get any locks at the record level in the first place). I suppose another alternative solution is (if you're overwriting the entire table, as in deleting and recreating it), is modify your FME process to keep the table, and just truncate and append the new records to it. I think that would eliminate the schema locking issue.
... View more
05-16-2025
08:04 AM
|
2
|
1
|
2128
|
|
POST
|
Would content categories accomplish what you're needing? You can create your own categories within your groups to organize content.
... View more
05-16-2025
07:49 AM
|
0
|
0
|
1033
|
|
POST
|
Normally there are connections to the DB with one instance running, even if no one is actually using the feature service. You could set the minimum number of instances to zero. But the downside is that your users will have roughly an extra 30 second delay for that feature service to come online the first time it is used after being at zero instances. I suppose the more "elegant" way of handling it would be to stop your feature service as a part of your FME process. Then you wouldn't have to worry about the feature service causing any locks. This support article says how you can do it through the Python API, which you could integrate into your FME processs. You could configure it to run the Python to stop the services before the FME process runs, then run the Python again afterwards to start the services.
... View more
05-16-2025
07:29 AM
|
1
|
0
|
2140
|
|
POST
|
Is the feature service actively running when you're running the FME workspace and receive the lock error? If other people are actively using the feature service, it might not be able to delete the data because it's locked by other people. Even if no one is using the feature service, if you have it as a shared instance or a dedicated instance with minimum number of instances of 1 or more, then the feature service is running and could cause locks. The first step I would try is look at the other connections to the DB when you receive the error. If there are other connections, try disconnecting them and trying again (keep in mind that the feature service could reconnect after disconnecting it, so it might be best to completely turn the feature service off in Server Manager to ensure it doesn't reconnect and cause locks).
... View more
05-16-2025
06:31 AM
|
0
|
2
|
2145
|
|
POST
|
The Selection Tab is in the layer properties. Right click the layer on the contents pane in your map and click properties. Then click the selection tab. This documentation has some information about it.
... View more
05-15-2025
07:18 PM
|
0
|
0
|
831
|
|
POST
|
I can think of a couple different methods you could use. Convert the legends to graphics (right click the legend and click convert to graphics). You will have a lot more individual control over the legend, and you can move the individual pieces of the legend (like the symbol, text, etc.) to wherever you like. You can even add text (like your era names) to it. The downside to this method is that your legend will no longer be dynamic/associated to your layer's symbology. So any symbology changes you make will not be reflected in the legend. Create copies of the layer in the map, with each layer representing your geologic era. You can set up a definition query to only display the records for each era. Then, you can create a legend and it'll break it down by each layer (or era). You probably won't have as much flexibility with this method as opposed to the first method I suggested, but it might work. Besides that, I'm not sure of a way to "natively" do what you're wanting, but I think the methods I listed above might work.
... View more
05-15-2025
07:12 PM
|
0
|
0
|
2259
|
|
POST
|
I just tried this and the Add Fields button is visible for me for a hosted feature service with a relationship class. By any chance is your hosted feature service restricted from being able to add fields?
... View more
05-14-2025
04:57 PM
|
0
|
0
|
738
|
|
POST
|
If you create a "file" question in your survey with a multiline appearance, it will allow you to select multiple photos at a time. The downside is that it will allow users to upload more than just photos, but it will accomplish what you're asking. Edit: It looks like someone made an ArcGIS Idea regarding this. https://community.esri.com/t5/arcgis-survey123-ideas/select-multiple-photos-to-upload-to-survey123/idi-p/1001978/page/2#comments
... View more
05-14-2025
12:47 PM
|
2
|
2
|
1430
|
|
POST
|
My only thought is that your survey was "hiding" in a folder. When searching in your content, make sure you have "All my content" selected and then search for it. Otherwise, if you're able to access it when searching your organization, then at least you'll be able to access it that way and be able to get to the data.
... View more
05-13-2025
11:48 AM
|
0
|
4
|
2295
|
|
POST
|
Another thought is are you still able to submit surveys? Even if the survey/data is deleted, the form will still exist on your tablet if you already had it previously downloaded. You can confirm that the form/data still exists if you're able to successfully submit a survey.
... View more
05-13-2025
11:24 AM
|
0
|
1
|
2331
|
|
POST
|
Instead of searching through only your content, have you tried searching your entire organization? So that way, in the event someone else took ownership of it, you'll still be able to find it.
... View more
05-13-2025
11:21 AM
|
0
|
8
|
2332
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Wednesday | |
| 3 | a week ago | |
| 1 | 06-10-2026 11:28 AM | |
| 1 | 06-10-2026 11:08 AM | |
| 1 | 06-08-2026 06:44 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|