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 / Saving a people field ...
Power Apps
Answered

Saving a people field back to a SharePoint list when you change the default value of a Card

(0) ShareShare
ReportReport
Posted on by 32

I have a very basic SharePoint list where I am creating a PowerApp to log daily security events.  One field is the individual that is submitting the event and another is the submission date/time.  When a form is "New" I would like the submitter field to default to the logged in user, and the submission date/time to default to the current date/time (E.g., Now()) and both fields should not be edited by the user.

 

For both the Submitter and Submission Date/Time, when the form is "New" I have updated the card default values as such:

Submitter:

If(
EditForm1.Mode = FormMode.New,
{Value: Office365Users.MyProfile().DisplayName},
ThisItem.SubmitterName
)

Submission Date/Time:

If(EditForm1.Mode = FormMode.New, Now(), ThisItem.SubmissionDateTime)

 

I have also update the DisplayMode for both items:

Submitter:

DisplayMode.Disabled

 

Submission Date/Time:

DisplayMode.Disabled

 

When I bring up the screen in "New" mode, everything is correct:

MRKennedy_1-1683809676090.png

 

However, when I save the form by using the "check mark" in the upper right corner everything is saved except the Submitter Name.  I have confirmed this is also the case when viewing the SharePoint List.  Also, is saves when I remove the values and change is using the dropdown.  

MRKennedy_2-1683809726502.png

     I have read several other posts (E.g., https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-Default-a-People-Picker-to-current-user-amp-save-to/m-p/553915#M171167) that has a different solution (which I still can't get to work), but how can I change the exact same attributes on two different fields (Person and Date/time) but only have one save back to the data source?

MRKennedy_3-1683809740304.png

 

Any recommendations would be greatly appreciated.

Thank you

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @MRKennedy ,

     

    If SubmitterName is a person column , you could try:

    If(
    EditForm1.Mode = FormMode.New,
    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Department: "",
     Claims: "i:0#.f|membership|" & User().Email,
     DisplayName: User().FullName,
     Email: User().Email,
     JobTitle: "",
     Picture: ""
     },
    ThisItem.SubmitterName
    )

     

    Best Regards,

    Bof

  • MRKennedy Profile Picture
    32 on at

    You're awesome - thank you!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard