こんにちは。
データテーブルの列の値を条件に一致する場合は、そのまま保持。
一致しない場合は、データテーブルの列のすべての値を"0"に変更したいです。
ロボットの負荷を軽くするために、繰り返し(各行)以外で設定する方法はありますでしょうか?
方法があれば教えていただきたくよろしくお願いいたします。
こんにちは。
データテーブルの列の値を条件に一致する場合は、そのまま保持。
一致しない場合は、データテーブルの列のすべての値を"0"に変更したいです。
ロボットの負荷を軽くするために、繰り返し(各行)以外で設定する方法はありますでしょうか?
方法があれば教えていただきたくよろしくお願いいたします。
こんにちは
たとえばInoveCodeアクティビティ内でLINQをつかって処理します。
以下は0列目の5未満を0にしています。
dt.AsEnumerable.Where(Function(r) CInt(r(0))<5).ToList().ForEach(Sub(r)
r(0)=0
End Sub
)
Sample20230724-3L.zip (2.8 KB)
Hi @nana.o
Use for each row in datatable activity to iterate the each row of datatable.
Inside for each take the If condition and write the condition
Currenrow(“Column name”)=(“Value”)
In else block take an assign activity in Save to field → Currentrow(“Column name to update”)
in value field → “0”
It will check the every row with the condition if condition is passed then it will update that column.
Check the below image for better understanding.
Output -
Hope it helps!!
Thank you @nana.o
If you find the solution Make mark it as solution to close the loop.
Happy Automation!!
ありがとうございます。
こちらの方法で解決することができました。
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.