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

Dataverse で Power Apps キャンバスアプリから一括更新する際はまった

Last updated at Posted at 2025-01-28

以前以下のような記事を書きましたが、Dataverse の場合、少し違う (変わった?) ため、備忘のため記事を書いておこうと思います。

とりあえず、ギャラリーに以下のように Dataverse のテーブルを一覧表示して変更できるようにしています。

image.png

まず、以下のように書くとエラーになりました。ThisItem はレコードなんだけど。。。

image.png

image.png

では、LookUp に変えてみます。同じエラーで失敗します。。

image.png

image.png

結果的に以下でうまくいきました。一旦 As で別名つけてあげる必要がありました。SharePoint リストの場合、ThisRecord のままで行けたんだけど、、

image.png

ForAll(
    Gallery1.AllItems As Item,
    Patch(
        TrainingRequest,
        Item,
        {ParticipantName: Item.TextInput1.Text}
    )
)

なお、Dataverse の場合、以下でも行けました。わざわざ LookUp するのは少し効率悪いので、上記の方がいいですかね。

image.png

ForAll(
    Gallery1.AllItems As Item,
    Patch(
        TrainingRequest,
        LookUp(
            TrainingRequest,
            TrainingRequest = Item.TrainingRequest
        ),
        {ParticipantName: Item.TextInput1.Text}
    )
)

以上、Dataverse の場合、SharePoint リストの時と一括更新時の書き方が少し違ったので、少し注意が必要かと思います。

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