Home Search

DriveWorks Pro 22
TableRemoveBlankColumns

Send Feedback

TableRemoveBlankColumns

Removes any columns from the table where every cell in that column is blank.

Syntax

TableRemoveBlankColumns(Table, Include Header Row)

Where:

Table is the Table to remove blank rows from.

Include Header Row (optional) is True if the header row should be considered when deciding if a column is blank. False or omitted will not consider the header row.

Examples

RuleMeaning
TableRemoveBlankColumns(DWGroupTableCustomers)Will remove the columns where every cell is blank, regardless of the header cell content. See Example Outcome 1 below.
TableRemoveBlankColumns(DWGroupTableCustomers, TRUE)Will remove the columns where every cell is blank only when the header cell is blank. See Example Outcome 2 below.
TableRemoveBlankColumns(DWGroupTableCustomers, FALSE)Will remove the columns where every cell is blank, regardless of the header cell content. See Example Outcome 1 below.

Example Data

DWGroupTableCustomers

CustomerNameCityCountry
Amazon Warriors[Blank]France
Bolton Burners[Blank]United States
Boston Bulls[Blank]Germany
Cambridge Cats[Blank]France

Example Outcome 1

For the rules:

TableRemoveBlankColumns(DWGroupTableCustomers)

and

TableRemoveBlankColumns(DWGroupTableCustomers, FALSE)

CustomerNameCountry
Amazon WarriorsFrance
Bolton BurnersUnited States
Boston BullsGermany
Cambridge CatsFrance

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"CustomerName","Country";"Amazon Warriors","France";"Bolton Burners","United States";"Boston Bulls","Germany";"Cambridge Cats",""}

Example Outcome 2

For the rule:

TableRemoveBlankColumns(DWGroupTableCustomers, TRUE)

CustomerNameCityCountry
Amazon Warriors[Blank]France
Bolton Burners[Blank]United States
Boston Bulls[Blank]Germany
Cambridge Cats[Blank]France

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"CustomerName","City","Country";"Amazon Warriors","","France";"Bolton Burners","","United States";"Boston Bulls","","Germany";"Cambridge Cats","",""}