Retrieve Model Number: Column 'Name' does not belong to table DataTable

Good morning,

Could someone please help me solve my issue. I am trying to run aircraft numbers through a search on the OFAC website. If there is a potential sanction multiple results can appear in the form of a datatable. I’m trying to read the table and then dynamically click on each row. I’m getting the error below:

If you run it from the second sequence in the flowchart, you can use the attached Excel file and it will produce results on the second item in the list.
Collateral.xlsx (11.4 KB)
Main.xaml (73.7 KB)

Thank you!

You’re looking for column “Name” in Collateral.csv, but the column with that header doesn’t exist.

@Anthony_Humphries what do I need to update in my process? I can’t seem to find where I’m looking for that column. I thought I was just reading the whole spreadsheet to create a DT and then just using the 9th column when I use row(8).tostring. I can’t find anything that is linked to “name.”

Ah, I was looking at the wrong line. Can you set a breakpoint on the ForEach before the error and show me what columns are in table “Negative_Results_DT”?

Is this what you’re looking for?

The name of your first column is “Column-0”, while reading the datatable, can you allow headers to see if you can get the column name. else use “Column-0” instead of Name.

That was what I was looking for. You’ll want to use either of ANSHUL’s suggestions to correct the error.

@ANSHUL and @Anthony_Humphries sorry for all the questions on this one.

So, I’m using datascraping to build this DT and I’m guessing I need to change something in the “extract metadata” field to correct this?

It looks like it’s already attempting to get the column names, but cannot read them. In this case, it will be easiest to use the given column names “Column-0”, “Column-1”, etc. Alternatively, you can rename the columns, but this will add an additional step to your workflow.

Agreed. I’m not using the column names for anything so I can just use the given names. I’m still unsure as to what I need to update in my workflow.The only reference I have is the BtnName you helped me develop in the last thread and that is row(0).tostring. Do I just need to change that to row(Column-0).toString?

You have BtnName set to Row("Name").ToString by default. If you clear this out, then it should work.

@Anthony_Humphries thank you for all your help. I got it all to run.

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