6
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.

Dataverse の選択肢列の情報 (テキスト) を Power Automate の通知で表示させる

Last updated at Posted at 2022-12-22

何が問題か

例えば、Dataverse で以下のような選択肢列を作成していたとします。

image.png

Power Automate で、以下のようなフローを作成し、データが登録されたら Teams のチャネルなどに通知させようとします。

image.png

しかし、通知の内容を見ると、内部的な値が表示されてしまいます。
これでは、通知を見た人は何のことだか分かりませんよね。

image.png

私自身も良く忘れるので、今回は、このようなケースにおける対処策を説明します。

対処策

まず、こちらのリンクの情報に助けられました。ありがとうございます。

ちょっと面倒ですが、一旦、以下のようなフローを作成し、実行します。
取得するレコードは何でもいいです。

image.png

以下の箇所を控えておきます。

cr841_plan@OData.Community.Display.V1.FormattedValue

続いて以下のように、取得したい選択肢列を変数に入れて、[コードのプレビュー] を選択します。

image.png

以下の箇所を控えます。

image.png

"@{outputs('ID_で行を取得する')?['body/cr841_plan']}"

上記二つを以下のように結合します。

outputs('ID_で行を取得する')['body/cr841_plan@OData.Community.Display.V1.FormattedValue']

試してみます。
正しく動作したようです。

image.png
image.png

元のフローも修正してみます。

※確認する限りでは、[行が追加、変更、または削除された場合] では、
 "cr841_plan@OData.Community.Display.V1.FormattedValue" が取得できなかったため、
 ID で行を取得するの処理を入れています

上手く行ったようです。

image.png
image.png

6
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
6
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?