{"id":1913,"date":"2013-04-07T05:59:15","date_gmt":"2013-04-07T05:59:15","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=1913"},"modified":"2024-05-06T12:27:43","modified_gmt":"2024-05-06T12:27:43","slug":"accessing-sharepoint-user-profile-service-fields-within-infopath","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/sharepoint-user-profile-service-infopath\/","title":{"rendered":"Accessing SharePoint User Profile Service fields within InfoPath"},"content":{"rendered":"<h2>Accessing the SharePoint User Profile Service within InfoPath<\/h2>\n<p>Accessing User Profile information is quite useful from within InfoPath. \u00a0This is great for acquiring user fields such as title, phone number or any custom field created within the UPS (User Profile Service).<\/p>\n<p>Within InfoPath, first, define the data connection to the UPS:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1917 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups1.png\" alt=\"img\" width=\"622\" height=\"368\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups1.png 622w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups1-300x177.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/p>\n<p>Then select the appropriate method.\u00a0 User Profile Service is quite a rich web service with a lot of methods:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1918 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups2.png\" alt=\"img\" width=\"631\" height=\"571\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups2.png 631w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups2-300x271.png 300w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/p>\n<p>Here\u2019s what the user() value check looks like, on Form Load, that then is used to decide whether to change Views:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1921 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups3.png\" alt=\"img\" width=\"901\" height=\"499\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups3.png 901w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups3-300x166.png 300w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups3-768x425.png 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/p>\n<p>Here\u2019s how to get the property of a user.\u00a0 Decide the property to get:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1924 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups4.png\" alt=\"img\" width=\"1124\" height=\"466\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups4.png 1124w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups4-300x124.png 300w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups4-1024x425.png 1024w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups4-768x318.png 768w\" sizes=\"auto, (max-width: 1124px) 100vw, 1124px\" \/><\/p>\n<p>Decide the account for which to get the property:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1925 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups5.png\" alt=\"img\" width=\"1132\" height=\"435\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups5.png 1132w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups5-300x115.png 300w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups5-1024x393.png 1024w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups5-768x295.png 768w\" sizes=\"auto, (max-width: 1132px) 100vw, 1132px\" \/><\/p>\n<p>Trigger the method:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1928 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups6-768x298-1.webp\" alt=\"img\" width=\"768\" height=\"298\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups6-768x298-1.webp 768w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups6-768x298-1-300x116.webp 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/p>\n<p>Then extract the result set!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1929 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups7.webp\" alt=\"img\" width=\"970\" height=\"623\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups7.webp 970w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups7-300x193.webp 300w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/ups7-768x493.webp 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>Very useful. It works like a charm.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Accessing the SharePoint User Profile Service within InfoPath Accessing User Profile information is quite useful from within InfoPath. \u00a0This is great for acquiring user fields such as title, phone number or any custom field created within the UPS (User Profile Service). Within InfoPath, first, define the data connection to the UPS: Then select the appropriate [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":1915,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[51],"tags":[],"class_list":["post-1913","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-infopath"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1913","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=1913"}],"version-history":[{"count":2,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1913\/revisions"}],"predecessor-version":[{"id":1938,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1913\/revisions\/1938"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/1915"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=1913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=1913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=1913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}