こんにちは
UiPath Studio 2025.0.167STS Community editionのユーザーです。
ForEachRowアクティビティでインデックスを明示的に設定しない場合は、自動でインデックスがインクリメントされるが、プログラマーがForEachRowアクティビティでインデックスを明示的に設定した場合は、自動でインデックスがインクリメントされないという理解であってますか?
こんにちは
UiPath Studio 2025.0.167STS Community editionのユーザーです。
ForEachRowアクティビティでインデックスを明示的に設定しない場合は、自動でインデックスがインクリメントされるが、プログラマーがForEachRowアクティビティでインデックスを明示的に設定した場合は、自動でインデックスがインクリメントされないという理解であってますか?
You cannot set the index value in for each it would always start from 0 and increments by 1 automatically
Cheers
Hi, @Anil-san, from a country with so many HERO motor shops,
I am so sad to see you misundersood me…
Have a chai to calm down.
My question is shown below…
“May I think If a programmer explicitly sets the index in the ForEachRow activity, the index will be incremented automatically?”
Cheers to your Lord Lakshmi & Ganesha
「明示的に設定」というのは、For Each Row アクティビティより前に変数を宣言し、たとえば「0」で初期化したうえで、
アクティビティの「現在のインデックス」プロパティにその変数を指定した場合、「インクリメントの挙動はどうなるか」というご質問でしょうか。
この場合、変数を事前に宣言した場合でも、アクティビティのプロパティで新たに指定した場合でも、「現在のインデックス」に指定された変数は自動的に 0 から始まり、1 ずつインクリメントされます。
開発者が手動で加算する必要はありません。
Hello @gorby
The For Each Row in Data Table activity has a property for index that represents the index of the current row being processed.
You can naturally manipulate this index in which way you want, but as default it will always represent the index of the current row (starting from 0).

Regards
Soren
この仕様はForEachアクティビティでも同じでしょうか。つまり同じインデックスで2回ForEachアクティビティを連続して回した場合、インデックスを初期化する必要はないという理解で正しいですか?
その理解で大丈夫です。
プロパティに現在のインデックスの変数設定ができる場合は初期化する必要はありません。
I believe my understanding and everyone else’s is also on the same page. Lets meet on a chai if you are in my sacred Indian land.
Index from any for each activity is an out argument which you cannot or need not set as well..it behaves as is what ever you do with your variables as that is bound to start from 0 and increment by 1 always
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.