Error message: Column doesnt belong to table Table Name

Hi,
I’m facing a problem with my robot on UIpath. The column “PHL0921_PHL-0922-3_SEABN_2_20210916” does not belong to table Datatable. Does anyone knows how to solve this issue.

Here is my DT

image

And here i iterate through the DT.

ill get this error message

“message”: “System.ArgumentException ; System.Data ; Column ‘PHL0922_PH-0922-4_SEABN_1_20210921’ does not belong to table TableName.”,
“level”: “Error”,
“logType”: “User”,
“timeStamp”: “09:12:16”,
“processVersion”: “1.0.47”,
“jobId”: “6962dc3d-a81e-4b0f-9547-be0a98de1d15”

How do i solve this?

Thanks in advance

Hi @Milo_Soderberg

Can you please try giving row(“columnname”). Tostring and try.

Thanks

Hi @Milo_Soderberg,

You need to give string or index.

For example ;
row(0).ToString
or
row(“columnName”).ToString

Regards,
MY

Hi muhammedyusuak,

where should ill give string or index

In IF activity and in Assign activity i already use .tosting

Regards
majloPajlo

from the exception we would assume that the column name is a column value. So check the part where datatable is populated / readin. When excel is involded then check the AddHeaders options.

Once this is confirmed then debug the flow and verify that the proper column name is used

Feel free to share more details with us

Please have a look,

Thanks

Hi ppr,

yes, “PHL0921_PHL-0922-3_SEABN_2_20210916” is the value in Column EpostÄmnesrad

dt_epost is a Datatable variable and not an excelsheet.
Should i write the info in a excelsheet and the transfer it to my main excelsheet for case information? The problem is that icant introduce (make)the main excelsheet earlier in my process.

Here ill add the info to the datatable variable.


EpostMottagen and EpostÄmnesrad are both Arguments (string)

we guess that is not needed. As we do the case analysis from remote we only have a limited access to all details. When it is only about datatable then stay with it

can you share with us the activity which is faiing. we assume that there is somwhere where a value is read or strored from/on a datacolumn. Thanks

Hi,

It was a multiple problem. I changed Row(EpostÄmnesrad).toString = ÄmnesradTillTransaktion to
Row(0).ToString.ToUpper.Trim = ÄmnesradTillTransaktion.ToString.ToUpper.Trim

and then i discovered through dt_epost.rows.count.ToString that my DT had multiple rows instead of one.

Problem solved.

thanks everyone

1 Like

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