1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Power Automate の「開始して承認を待機」アクションの「連続した承認」で、承認の結果の順番が入れ替わることがある。

Last updated at Posted at 2025-05-05

Power Automate の「開始して承認を待機」アクションの「連続した承認」において、トリガーとトリガーの間隔が短い場合(おそらく2分以内)、承認の結果の順番が入れ替わることがある。

※ 追記:トリガー同士の間隔ではなく、承認同士の間隔かもしれないがよく分からない。とりあえず、複数人が一気に承認依頼を出すとこの事象が発生する。

スクリーンショット 2025-05-05 201225.png

「開始して承認を待機」アクションの未加工出力に配列「responses」がある。本来であれば、承認を行った順(=responseDate が古い順)にデータが並ぶのが正しい。しかしこの事象が発生すると、最後の承認(responseDate が新しい)が一番上に来てしまう。

スクリーンショット 2025-05-05 200504.png

この状態だと後続のアクションで承認者のコメントなどを使う際に支障がでるので、正しい順番に直したい。

「For each」アクションで承認者のコメントなどをループ処理しているのであれば、sort 関数で responseDate でソートしてからループ処理するのが良さそう。

スクリーンショット 2025-05-05 200600.png

PowerFX
sort(outputs('開始して承認を待機')?['body/responses'], 'responseDate')

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?