Filtered data table records
/Description: Display filtered data table records.
Assumptions: An optional 'myTable' data table type script parameter.
#Pick one of the following data table reference methods: #myTable = Application.Document.Data.Tables['MyDataTable'] #Name method #myTable = Application.Document.ActiveDataTableReference #Active data table method #myTable = Application.Document.Data.Tables.DefaultTableReference #Default data table method #myTable as a data table type script parameter #Script parameter method filteredRows = Document.ActiveFilteringSelectionReference.GetSelection(myTable).AsIndexSet() for row in filteredRows: for column in myTable.Columns: print column.RowValues.GetFormattedValue(row)