Monday, March 7, 2022

How to Patch Person Lookup with PowerApps

Introduction: 

In this Blog we will see how to Patch Person Lookup with PowerApps with SharePoint.


Implementation Steps:


Consider a Scenario, we need to Update or Set Person Lookup Field from PowerApps


Patch Logged in User to a Lookup Field:


Patch(

    'TABLE NAME',

        PERSONLOOKUPNAME: {

           '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

           Claims: "i:0#.f|membership|"&User().Email,

           Department: "",

           DisplayName: User().DisplayName,

           Email: User().Email,

           JobTitle: "",

           Picture: ""

        }

    }

);


Patch different User to a Lookup Field:

 Patch(

    'TABLE NAME',

        PERSONLOOKUPNAME: {

           '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

           Claims: "i:0#.f|membership|email@emaildomain.com",

           Department: "",

           DisplayName: "USER FULLNAME",

           Email: "email@emaildomain.com",

           JobTitle: "",

           Picture: ""

        }

    }

);


Hope this helps.

No comments:

Post a Comment

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...