How do I name a scraped DataTable's first column to keep consistency?

Hey there,

I am scraping data from a portal and it seems that the columns are named something different each time. Is there a way in which I can name the first column to be consistent? I need to filter later on in the build and it keeps erroring as the column headers differ.

Below is an example of the table:

Thanks for your help.

HI @dr1992

If you need to filter the first column instead of name you can also use index (i.e., 0)

Regards
Sudharsan

This is what I was using before but it couldn’t find ‘0’ when trying to filter. Is there a certain way this is meant to happen?

Can you tell how you are filtering and can you share the screenshot? @dr1992

So the filter works within an ‘if’ where if a value is present then it gets filtered. I have had no issues with this until the column name changes with each portal page.

image

Alternatively, could I name the data table columns with the ‘build data table’ activity before scraping? I tried this before but it didn’t work as intended.

Try this in the Column name @dr1992

pVehicleExtrasDT.Columns(0).ColumnName.ToString

Regards
Sudharsan

I tried this also but it told me it couldn’t find column 0 aha

Edit: I think this was an unrelated issues - thank you for your help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.