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 / People Picker returns ...
Power Apps
Unanswered

People Picker returns previously added person

(0) ShareShare
ReportReport
Posted on by 19
Hi all, I am pretty new to powerapps and I need your help with the following issue:I build an app in powerapps that allows a person to assign tasks to other people (they will receive an email notification that a new action has been assigned to them). The issue is that, for eg: 1. I create a new form for assigning a new task to a specific person and then save and submit the form. 2. When I open a new form or even an old one for editing, the name of that specific person (from 1) is prepopulated in the people picker box. Basically, what I would need is that when I create a new task the people picker box to be empty (and not prepopulated with the previous person used), or when i am editing an existing form, the people picker form to be populated with the person that have that task assigned.Thanks a lot!!
Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Amelie 

    What is your DefaultSelectedItems property of your Combobox control?  If this is in a form, it should be based on the Parent.Default of the datacard.

    Check that property and see if it is not set properly.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, so if the Form Mode is New it should reset and be blank. However there is also a Reset function that you can pass the name of a control. It will then reset to the default value of the control.

    In terms of editing, you need to ensure that the item of the form is the item whose values you want to be populated in the Form.

    Hopefully the following shows some helpful concepts:

    HenryARPhillips_0-1614118250305.png

    So above on the left we have a gallery looking to the same SP List that the Form on the right is hooked up to. The submit button is literally just doing SubmitForm(FormName). Now that in itself and with the Form set to a default mode of New, once submitted it will revert back to a blank empty form to be filled out.

    HenryARPhillips_1-1614118348345.png

     

    Notice default mode on the right.

    I make an entry and click submit, first screen shot. Second shows the state of the form afterwards.

    HenryARPhillips_2-1614118394477.png

     

    So here this has actually done what you have stated and this is because the form has not been reset and is still in edit mode

     

    HenryARPhillips_3-1614118449194.png

     

    So one thing I could do here is have some logic such as in the new button

    HenryARPhillips_4-1614118480430.png

     

     

    Pressing new takes me to a state of 

    HenryARPhillips_5-1614118497260.png

     

    Now if we go back and Submit again, except this time we will change the submit button logic to:

     

    HenryARPhillips_6-1614118568798.png

    Now for the same example, new entry is made and submit is hit

    HenryARPhillips_7-1614118602988.png

     

     

    HenryARPhillips_8-1614118612295.png

     

    The above is now blank as we ensured we set the Form to new. So your first issue is probably because the Form is still in edit mode. Now in terms of editing the right item, in my example I am using a gallery and when I click to go into the item, it is going to enter the form in edit mode and set a variable that is populated in the item property of the form.

     

    HenryARPhillips_9-1614118695807.png

     

    HenryARPhillips_10-1614118709107.png

     

    HenryARPhillips_11-1614118718621.png

     

     

    Now there are many ways to achieve the above, one quick way of seeing how you do this is to create a Power App from a SharePoint List. But hopefully this lays down the following key concepts that will help:

     

    FormMode

     

    Setting the Item that exists in the data source of the Form whilst in Edit Mode.

     

    Also look to things like LastSubmit, if you want a quick reference to what was Last Submitted.




  • Amelie Profile Picture
    19 on at

    Hi! Thank you for your reply. 

    I see that I am not using a form. The screen contains multiple dropdowns list where I can select or add the info required (for eg: a dropdown where I can select the name from Office365, a dropdown for category and so on). Now, if I select one dropdown: DefaultSelectedItems Property is empty, DisplayMode is DisplayMode.Edit and Visible: If(varmode="New"||varmode="Edit", true). 

    I've tried to add to DefaultSelectedItems = Parent.Default, but I receive the following message: "Name isn't valid. The identifier isn't recognized.".

     

    I'm still trying to understand how powerapps works, so sorry if I am not that clear. Thanks!

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Amelie 

    So if this is Not in a Form, then you will need to provide the appropriate formula for the DefaultSelectedItems property.  You have none right now...that will never select anything.

    Parent.Default is only relevant to forms.

    How are you getting a record for the screen that has the information??  Is this screen being reached by selecting a Gallery item?  Is this integrated into SharePoint (customize forms), or is a standalone app?

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard