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

Power Apps でマスタコンボボックスで Distinct 関数を使った時に既定値を設定する

Last updated at Posted at 2025-12-08

Power Apps でアプリを作る際、以下のようにマスターデータを用意して、そちらの情報を基に入力させたいときがあります。

image.png

image.png

この際、以下のようにフォームコントロールのデータカード内にコンボボックスを追加して、以下のように Distinct 関数を利用することで実現できます。

image.png

image.png

image.png

image.png

このような方法を使う際、新規登録は問題ないのですが、編集したいとき、コンボボックスの中身が空になってしまいます。

image.png

そのため、[DefaultSelectedItems] プロパティに以下のように設定をしてみますが、エラーとなってしまいます。

image.png

こちらは、Distinct 関数の戻り値がテーブル形式となっているためです。そのため、以下のように指定することで、元々入っていた列の情報が表示されます。

image.png

[{Value: Gallery1.Selected.エリア}]
11
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
11
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?