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

【PowerApps】SharePointリストの画像列に画像を一括保存

Posted at

【PowerApps】スマホで連続撮影して、SharePointリストに一括保存 その2

動画を公開しました。

コレクションのcol_imageは_image列に画像、_save列に選択の有無
SharePointリストのimage_listは画像列image_gazouに画像を保存します。

保存するボタンに以下の数式を入力

ForAll(
    Filter(
        col_image,
        _save = true
    ),
    Collect(
        image_list,
        {image_gazou: {Value: _image}}
    )
)

分解してみていきます。

初めのForAll関数はデータを順に取出し、数式を処理していく関数です。

ForAll(データ,数式)

の形で記入します。
今回は、データにフィルターをかけたコレクションのcol_image。
数式にはSharePointリストのimage_listに保存する数式を入れています。

 Filter(
        col_image,
        _save = true
 )

データのコレクションはFilter関数で_save列がtrueのものだけに絞り込んでいます。
ギャラリーでチェックを入れた列だけ保存する想定です。
コレクションの中身をすべて保存するなら、フィルター掛けずにcol_imageだけでOK。

 Collect(
        image_list,
        {image_gazou: {Value: _image}}
 )

こちらが、Collect関数でSharePointリストに画像を保存する部分。
image_listの画像列image_gazouに{Value:画像}を入れます。
_imageはコレクションの_image列の画像ですが
ForAll関数でコレクションの行を順に処理していくので、保存する画像が順次ここに入ります。

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