リスト変数lis_Pathの値を1つずつDataRow変数dr_TransactionItemに取得したい

こんにちは。
指定フォルダのファイル一覧をリスト変数lis_Pathに取得後、リスト変数lis_Pathの値を1つずつDataRow変数dr_TransactionItemに取得したいです。

ElseIfアクティビティを2個並べてdr_TransactionItemを回すフローを制御したいが、下記の構文でどこか記述誤りはないでしょうか?リスト変数を扱いなれていないため、自信がありません。リスト変数に詳しい方、問題があればアドバイスをお願いします。
int_TransactionNumberの初期値は0になります。


ElseIfアクティビティ

条件 int_TransactionNumber < lis_Path.Count

Then dr_TransactionItem = lis_Path.Item(int_TransactionNumber)


ElseIfアクティビティ

条件 int_TransactionNumber = lis_Path.Count

Then dr_TransactionItem = Nothing’⇒この後、正常終了処理へ


@gorby

If you are usinng reframework

Then transactionnumber starts from 1

So we need to use list_var(in_transactionnumber-1)

Cheers

Hi @Anil_G Thank you for your reply!
Since I did not use REframework as well as I intentionally set 0 as initial value of int_TransactionNumber, I assume
int_TransactionNumber starts from 0.

Are there any other inherent mistakes? Perfect?

@gorby

Ideally one if condition should suffice

int_TransactionNumber < lis_Path.Count

On then side use list_path(in_transactionnumber) and on else use nothing

Extra checks are not needed

Cheers

Hi Thank you for your reply again!

According to your answer, is “.Item” in the following sentence erasable?

dr_TransactionItem = lis_Path.Item(int_TransactionNumber)

@gorby

Yes list can be accessed directly as well as specified above

cheers

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