{"id":660,"date":"2020-02-17T08:30:00","date_gmt":"2020-02-17T08:30:00","guid":{"rendered":"https:\/\/www.malka-unscripted.com\/?p=660"},"modified":"2020-02-14T16:16:15","modified_gmt":"2020-02-14T16:16:15","slug":"powerapps-create-people-picker-field","status":"publish","type":"post","link":"https:\/\/www.malka-unscripted.com\/?p=660","title":{"rendered":"PowerApps: Create People Picker Field"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In a Canvas App, there is no People picker field like you have in SharePoint. Instead, you can configure the ComboBox control to act as your people picker field.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, Add <strong>Office365Users<\/strong> as a data source to the app.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"362\" height=\"239\" data-attachment-id=\"669\" data-permalink=\"https:\/\/www.malka-unscripted.com\/?attachment_id=669\" data-orig-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddO365DataSource.png?fit=362%2C239&amp;ssl=1\" data-orig-size=\"362,239\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"AddO365DataSource\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddO365DataSource.png?fit=300%2C198&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddO365DataSource.png?fit=362%2C239&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddO365DataSource.png?resize=362%2C239&#038;ssl=1\" alt=\"\" class=\"wp-image-669\" srcset=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddO365DataSource.png?w=362&amp;ssl=1 362w, https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddO365DataSource.png?resize=300%2C198&amp;ssl=1 300w\" sizes=\"auto, (max-width: 362px) 100vw, 362px\" \/><figcaption>Add Office 365 Data Source<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">From the Insert tab, \u00a0select the input drop down menu and add the Combo box control to the app.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"184\" data-attachment-id=\"671\" data-permalink=\"https:\/\/www.malka-unscripted.com\/?attachment_id=671\" data-orig-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddComboxBox.png?fit=444%2C184&amp;ssl=1\" data-orig-size=\"444,184\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"AddComboxBox\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddComboxBox.png?fit=300%2C124&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddComboxBox.png?fit=444%2C184&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddComboxBox.png?resize=444%2C184&#038;ssl=1\" alt=\"\" class=\"wp-image-671\" srcset=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddComboxBox.png?w=444&amp;ssl=1 444w, https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/AddComboxBox.png?resize=300%2C124&amp;ssl=1 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let&#8217;s configure the settings for the Combo box:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, let&#8217;s look at the items properties. To get all the O365 users as choices in the combo box, enter the following formula:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Office365Users.SearchUser({searchTerm: ComboBox.SearchText}).DisplayName) <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used DisplayName as the field that will display from the UserProfile but you can review the available fields and change it as needed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"105\" data-attachment-id=\"672\" data-permalink=\"https:\/\/www.malka-unscripted.com\/?attachment_id=672\" data-orig-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/DisplayName.png?fit=672%2C105&amp;ssl=1\" data-orig-size=\"672,105\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"DisplayName\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/DisplayName.png?fit=300%2C47&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/DisplayName.png?fit=672%2C105&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/DisplayName.png?resize=672%2C105&#038;ssl=1\" alt=\"\" class=\"wp-image-672\" srcset=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/DisplayName.png?w=672&amp;ssl=1 672w, https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/DisplayName.png?resize=300%2C47&amp;ssl=1 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This will list all the users in the organization as a drop down menu. Loading all users can slow down the app. So instead, we will only load the users if the search box is not empty, and then it will only return the users that are relevant for that search. Here is the updated formula:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If(!IsBlank(ComboBox.SearchText), Office365Users.SearchUser({searchTerm: ComboBox.SearchText}).DisplayName)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"906\" height=\"35\" data-attachment-id=\"673\" data-permalink=\"https:\/\/www.malka-unscripted.com\/?attachment_id=673\" data-orig-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/ItemsFormula.png?fit=906%2C35&amp;ssl=1\" data-orig-size=\"906,35\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"ItemsFormula\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/ItemsFormula.png?fit=300%2C12&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/ItemsFormula.png?fit=906%2C35&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/ItemsFormula.png?resize=906%2C35&#038;ssl=1\" alt=\"\" class=\"wp-image-673\" srcset=\"https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/ItemsFormula.png?w=906&amp;ssl=1 906w, https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/ItemsFormula.png?resize=300%2C12&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.malka-unscripted.com\/wp-content\/uploads\/2020\/02\/ItemsFormula.png?resize=768%2C30&amp;ssl=1 768w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Some other properties you may want to configure:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>DefaultSelectItem <\/strong>property<strong> <\/strong>to set the current user as the default value use this formula: <strong>Office365Users.MyProfile()<\/strong><\/li><li><strong>SelectMultiple<\/strong> property to determine if multiple users can be selected. The value can be true or false.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a Canvas App, there is no People picker field like you have in SharePoint. Instead, you can configure the ComboBox control to act as your people picker field. First, Add Office365Users as a data source to the app. From the Insert tab, \u00a0select the input drop down menu and add the Combo box control [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[5,41],"tags":[57,63,42,6],"class_list":["post-660","post","type-post","status-publish","format-standard","hentry","category-general-sharepoint","category-powerapps","tag-office-365","tag-people-picker-field","tag-powerapps","tag-sharepoint"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8wyUs-aE","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=\/wp\/v2\/posts\/660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=660"}],"version-history":[{"count":3,"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=\/wp\/v2\/posts\/660\/revisions"}],"predecessor-version":[{"id":674,"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=\/wp\/v2\/posts\/660\/revisions\/674"}],"wp:attachment":[{"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.malka-unscripted.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}