Error of Sorting datatable

May I ask why I encounter this problem suddenly while running the robot?


Can anyone help me to fix this issue? Many thnaks!!

Workflow:
FA Sorting ver…xaml (25.4 KB)
Source from Excel sheet:
template 23.2.24.xlsx (29.7 KB)

Hi @Happydayyy ,

From the workflow, I believe the expression that was faulted was the below :

Newtable.AsEnumerable().OrderBy(Function(row) row("Type")).CopyToDataTable()

The Expression that you are using is trying to sort the datatable with respect to the column Type in the Excel sheet.

From the data provided, the Type column is having the below values.
image

If it is a string sorting, then you could simply make a minor change in the expression as provided below and check if it works. But if the sorting is not the expected, then we would require you to explain us what actually is the task that you are trying to perform.

Corrected Expression :

Newtable.AsEnumerable().OrderBy(Function(row) row("Type").ToString).CopyToDataTable()

Thank you so much this issue has been solved.
But I face another issue, refer to Number issue
Can u help me fix it as well? Thx

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