4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Power Automate で Dataverse の "行を一覧にする" アクションの結果が null かどうか判定する

Last updated at Posted at 2023-01-15

はじめに

例えば、外部のシステム等から入力した情報をもとに、データソースから該当するレコードがあるかフィルターをして、存在しない場合は別のアクションを実行したいようなケースがあります。

今回は、Dataverse の "行を一覧にする" アクションをベースに実装アプローチについて紹介します。

image.png

実装アプローチ

以下のように、Dataverse の "行を一覧にする" の結果をベースに、該当するレコードがない場合は新しい行を追加、存在する場合はそのレコードを更新するようなフローを作成してみました。

image.png

条件式のポイントについて説明します。
左側は、以下のような感じで、empty 関数で "行を一覧にするアクション" の結果の value を囲みます。

empty(outputs('行を一覧にする')?['body']?['value'])

右側は、数式で true を入力します。

image.png

試しに実行してみます。データがない場合、新しい行を追加しているようです。
image.png
もう一度同じ内容で実行した場合 (データがある場合)、データを更新しているようです。
image.png

4
1
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
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?