Refresh a stale data table

1
2
if table.IsRefreshable and table.NeedsRefresh:
table.Refresh()

Input: table (Data Table)

This script is equivalent to pressing the red "refresh" icon that is shown when the data table is stale.