LINQ御指南ください

こんにちは
UiPath Studio 2025.0.161 Community editionのユーザです。

1.やりたいこと

dt_inputの列名は県名(String型)、人口(Int32型)、面積(Double型)です。
dt_inputを人口(Int32型)で降順に並び替え、かつ面積(Double型)で降順に並び替えて、 dt_inputに代入したい。

2.悩んでいること

下記の構文をAssignアクティビティに入力したら、添付画像の静的エラーが出ました。どう修正すればよいでしょうか?
dt_input=dt_input.AsEnumerable().OrderByDescending(Function(row) CInt(row("人口"))).ThenByDescending(Function(row) CDbl(row("面積"))).CopyToDataTable()

Hi @gorby

The error you’re encountering is likely due to the fact that the expression is trying to assign the result of CopyToDataTable() (which returns a DataTable) back into a variable of type Integer.

To fix this, ensure that dt_input is of type DataTable and not Integer.

Thanks

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