Select to view content in your preferred language

How to refresh attribute table after editing data with Python script?

2670
15
Jump to solution
12-21-2023 11:53 AM
AllenDailey1
Occasional Contributor III

Is there a way to refresh the data in a feature class's attribute table after running a standalone Python script?

Fully closing and re-opening ArcGIS Pro does accomplish this kind of refresh.  But it would be very helpful to get it to refresh without having to close the program!

I'm using Pro 3.0.3 and cannot upgrade for a long time, due to my organization's needs relating to versions of License Manager, ArcGIS Server, existing map services and apps, etc.

I'm running a standalone Python script that edits attribute data in a feature class that's in an enterprise geodatabase.  I am both editing and viewing the default, not a version.  After running the script, the edits do not appear in Pro, unless I close and reopen the software.  I have tried closing and reopening the attribute table, refreshing the data source in the Catalog pane (you'd think that would do it, but it does not), and panning/zooming the map in Pro.  None of that makes the edits appear in the table.  Any ideas?

Thank you!

0 Kudos
15 Replies
AllenDailey1
Occasional Contributor III

Okay, that's good to know.  Thank you very much for sharing that!

MattSteging
New Contributor

What is the status of ENH-000135306? Is there somewhere I can view the status?

Thanks.

0 Kudos
Robert_LeClair
Esri Notable Contributor

Hi Matt - I just pulled up the ENH-000135306 request to determine it's status - still show "in the product plan."  Not terribly helpful I know but that's the current status.

0 Kudos
melisahansen
New Contributor III

@Robert_LeClair has this enhancement request been completed? We still can't see data created via python script unless we manually refresh a version. 

0 Kudos
Robert_LeClair
Esri Notable Contributor

@melisahansen - as of 7/15/24, its status is still "in the product plan."  I don't see any new updates unfortunately.

0 Kudos
Michele_Hosking
New Contributor III

I'm running a python script from a toolbox tool (ArcGIS Pro 3.3.0) and it still doesn't refresh the attribute table.  Nothing seems to except refreshing from Data Source > Refresh  on the Contents pane. My data is in an enterprise geodatabase (sql server) and versioned using traditional versioning. I'm also using the new arcpy.RefreshLayer() command that came in with 3.3.0 but that does nothing.  I suspect because it's on a versioned feature class.

This is just super annoying - I just want an arcpy command that does the same as Data Source > Refresh.

0 Kudos