Remove columns from datatable from screen scraping

I am using screen scraping for an automation and need to remove columns that only contain null values. How is this accomplished?

Thanks!

Hi @lhendrix

In the Data Scrape wizard, after you extracted the data, click on “Edit data definition”.
Here you can modify empty columns or columns which you want to keep.

@lhendrix

Try below expression:
dataTablename.select(“Column1 <> ’ ’ AND Column2 <> ’ '”).CopyToDataTable

@ ChagandAkil - I don’t see anywhere to “Edit data definition”. I am using the Screen Scraping wizard. The data scraping wizard gives me an error when I attempt to use in BlueZone - see attached.

Data%20Scraping%20Error%204-26-19

@ lakshman - My screen scraping does not always return the same number of columns. Will your method work in that case or do I need to use something else?

Hi @lhendrix

After screen scraping, are you saving your data as a datatable.?
If so, you can use “remove data column” activity inside a if condition!!

Thanks so much, ChagantiAkhil. I do have it saved in a datatable. Can you please explain how I should write the If statement to work properly? I understand the If statement should show if ColumnX contains null values and then lead to the Remove Data Column activity if is true but don’t understand how to write the statement to show if column contains null values.

I really appreciate the help.

Laura

If you know which column contains null values directly you can pass the parameters in the remove data column activity or using filter data table activity, you can also remove columns.