以下のように、[AAD Users]を参照型で参照しユーザを選択する方法について説明する


以下のようなDBを作成


キャンパスアプリでコンボボックスを作成し、コンボボックスでユーザを選択できるようにする






①に以下のコーディング
Patch(task_0011,
Defaults(task_0011),
{
task_name:TextInput1.Text,
'AAD User':ComboBox1.Selected
}
);
ClearCollect(task_0011_collection,
ForAll(task_0011,
{
task_name:task_name,
user_name:ThisRecord.'AAD User'.'Display Name',
//can not get 'Mobile Phone' That's why use UserProfileV2
//mobilePhone:ThisRecord.'AAD User'.'Mobile Phone' → Return value null
mobilePhone:Office365ユーザー.UserProfileV2(ThisRecord.'AAD User'.'AAD user id',{'$select':"mobilePhone"}).mobilePhone,
companyName:Office365ユーザー.UserProfileV2(ThisRecord.'AAD User'.'AAD user id',{'$select':"companyName"}).companyName
}
)
);