web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to load Papps text...
Power Apps
Answered

How to load Papps text variable into SharePoint List person/group column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I am new to the use of SP List as data connector to my Papp. I do a Patch formula pasted below. There is an issue with passing an attribute which is text into SP list to variable that is type Person/Group i.e. RequestedBy. From some research, I have learned about the section after RequestedBy in the formula below but have such little knowledge do not know if going in the right direction. Any suggestion greatly appreciated. RequestedByAutoInput is the Papps variable which basically captures the User().Fullname value. Lastly, all other information is passed okay to the SP List since all these variable are identified as Single Line text in SP.

 

Patch(

    CertRegistrationProcess, Defaults(CertRegistrationProcess),

    {CertReqID: CertReqID.Text,

RequestedBy: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpanderUser",
Claims:" “,
Department:" ",
DisplayName: RequestedByAutoInput.Text
Email: “ ”,
JobTitle:" ",
Picture:" "},

        RequestorEmail: RequestorEmailAutoInput.Text,

        RegistrationDate: RegistrationDateAutoInput.Text,

        CertTypeID: CertTypeID.Text,

        CertName: CertName.Text,

        CertCompany: CertCompany.Text,

        CertCompanyID: CertCompanyID.Text,

        ExamRequestDate: ExamRequestDate.SelectedDate,

        ExamRequestTime: ExamRequestTime.Selected.Value,

        CertDateComplete: CertDateComplete.SelectedDate,

        RequesterComments: RequesterComments.Text,

        Office365UserID: Office365UserID.Text

    }

)

 

Thanks.

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    It seems that you have known about the column construct for the Person column.

    To patch Person column, you need to patch a record with '@odata.type', "Claims", "Department", "DisplayName", "Email", "JobTitle", "Picture" columns where the  '@odata.type' and  "Claims" column are required.

    The Claims value should be composed of "i:0#.f|membership|" & User's Email, so the code should be modified as follows:

     

    Patch(

        CertRegistrationProcess, Defaults(CertRegistrationProcess),

        {CertReqID: CertReqID.Text,

    RequestedBy: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpanderUser",
    Claims: 
    "i:0#.f|membership|" & User().Email,

    Department:" ",
    DisplayName: RequestedByAutoInput.Text
    Email: “ ”,
    JobTitle:" ",
    Picture:" "},

            RequestorEmail: RequestorEmailAutoInput.Text,

            RegistrationDate: RegistrationDateAutoInput.Text,

            CertTypeID: CertTypeID.Text,

            CertName: CertName.Text,

            CertCompany: CertCompany.Text,

            CertCompanyID: CertCompanyID.Text,

            ExamRequestDate: ExamRequestDate.SelectedDate,

            ExamRequestTime: ExamRequestTime.Selected.Value,

            CertDateComplete: CertDateComplete.SelectedDate,

            RequesterComments: RequesterComments.Text,

            Office365UserID: Office365UserID.Text

        }

    )

    Hope this helps.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you Sik for responding. Sorry to say it is still not working. Below is a capture of what I put in from your suggestion. The coding before would transfer all variables except for the RequestedBy. Now no information is being passed. I assume this is because the RequestedBy code error is causing the transfer from proceeding.

     

    Patch(
    CertRegistrationProcess, Defaults(CertRegistrationProcess),
    {CertReqID: CertReqID.Text,
    RequestedBy: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpanderUser",
    Claims: "i:0#.f|membership|" & User().Email,
    Department:" ",
    DisplayName: RequestedByAutoInput.Text,
    Email: “ ”,
    JobTitle:" ",
    Picture:" "},
    RequestorEmail: RequestorEmailAutoInput.Text,
    RegistrationDate: RegistrationDateAutoInput.Text,
    CertTypeID: CertTypeID.Text,
    CertName: CertName.Text,
    CertCompany: CertCompany.Text,
    CertCompanyID: CertCompanyID.Text,
    ExamRequestDate: ExamRequestDate.SelectedDate,
    ExamRequestTime: ExamRequestTime.Selected.Value,
    CertDateComplete: CertDateComplete.SelectedDate,
    RequesterComments: RequesterComments.Text,
    Office365UserID: Office365UserID.Text
    }
    )

     

    After displayname I added a comma after the .Text that was not there so assume that is correct to do.

    Error at first open parenthesis says Patch function has some invalid arguments

    Errors at first curly states: Invalid argument type. Expected a record value but of a different schema / Incompatible Type. The Email column in the data source your updating expects a 'Text' and you are using an 'Error' type.

    In the RequestedBy code, the value after Email: has red squiggly lines under the value of " ", and department has red quotes.

    Only highlighted variables in the code are CertReqID and RequestedByAutoInput.

     

    Should I include the RequestorEmail variable go into the value space for Email:?

     

    Any further assistance/suggestion you can provide would really be appreciated.......

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sik. I got it to work with your help. I took the RequestedEmailAutoInput variable and stuck it in again for the value after 'Email:'. All variables where highlighted and all values were transferred to the SP list. Yahoo! Thank you so much for pointing me in the right direction and helping educate me more.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard