LoginSignup
0
0

More than 3 years have passed since last update.

Microsoft Flow:オブジェクト(JSON)の値を更新

Posted at

仕様

 1. オブジェクト変数を初期化。

pr1.png

 2. アクションの「データ操作」>「作成」を選択
 
pr201.png

pr202.png

 3. オブジェクト変数のプロパティを「式」の「setProperty」で更新。
  ここで、デフォルトのアクション名「作成」を変更して、分かりやすい名前にしておく。

update
setProperty(variables('theVar'), 'name', 'taro')

pr21.png

 4. 続けて別のプロパティを更新。このときは、前の処理の結果を「outputs」で取得。これは、GUI上では、「出力」と表示されるものに相当。
  「outputs」の引数は、アクション名。ここでアクション名を使用するので、分かりやすい名前にしておくのがよい。

update2
setProperty(outputs('setName'), 'age', 100)

pr3.png

 5. アクションで「変数の設定」を選択肢、オブジェクト変数を指定し、値は更新アクションの最後の戻り値(出力:outputs)にする。

pr4.png

 6. OneDriveに変数を出力。

pr5.png

 7. 出力結果。

pr6.png

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