以下の状態だと問題ないのだが、
Patch(
test_concur_request,
Defaults(test_concur_request),
{
タイトル:DataCardValue1.Text,
計上日:DataCardValue2.SelectedDate
})
計上日の次に支払方法を以下のように記述したら
Patch(
test_concur_request,
Defaults(test_concur_request),
{
タイトル:DataCardValue1.Text,
計上日:DataCardValue2.SelectedDate,
支払方法:DataCardValue5.Selected.Value
})
次のようなエラーになった。
この引数 'payment_methods' の型は 'Record' と一致しません
だと。
Copilotに聞くと、どうやらリスト上の選択肢項目はrecord型らしい。
なんじゃそりゃ。
Copilotと建設的な話し合いにならなかったので試行錯誤した結果、
次のようにしたらうまくいった。
Patch(
test_concur_request,
Defaults(test_concur_request),
{
タイトル:DataCardValue1.Text,
計上日:DataCardValue2.SelectedDate,
支払方法: {
Value: DataCardValue5.Selected.Value
}
})
一筋縄では行きませんね!
以上