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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps form with p...
Power Apps
Unanswered

Power Apps form with person or group field. How to display stored value when edit and current user when new

(0) ShareShare
ReportReport
Posted on by 15

Hi everyone. I am new user on power apps. I have a sp list and i created a custom form with power apps. At my sp list i have a field which is "Person or Group" data type lets call it "Accountable_user".

My goal is to display the default user to the "Accountable_user" when i create a new record with the custom form and display the saved value of the "Accountable_user" from the sp list record when i edit the record with the custom form. 

 

The name of the datacard for the "Accountable_user" field is: Accountable_user_DataCard1
The name for the "Accountable_user" field is: DataCardValue11

To achieve my goal i wrote the following code to the DefaultSelectedItems property of DataCardValue11:

 

1.png

 

Also i wrote the following code to the Default property of DataCardValue11:

 

2.png

 

I managed to display the default user when i create a new record-item with the custom form but when i edit a record-item with the custom form DataCardValue11 doesn't display anything. 

 

I also pasted the code of the Default property of DataCardValue11 to the Default property of Accountable_user_DataCard1 with the same results. 

Any ideas?

Categories:
I have the same question (1)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @openmind ,

    Actually I think that it will work in DefaultSelectedItems something like:

     

     

    Coalesce
     (Parent.Default;
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
     ODataType: Blank();
     Claims:Concatenate("i:0#.f|membership|",User().Email);
     DisplayName:User().FullName;
     Email:User().Email
     }
    ) 

     

     

    Hope it helps !

  • openmind Profile Picture
    15 on at

    Thank u very very very much my friend. That worked perfectly. I really don't know how to thank you. I didn't know the Coalesce function

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard