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 / Clearing out people pi...
Power Apps
Unanswered

Clearing out people picker field

(0) ShareShare
ReportReport
Posted on by 4
I've customized the default form for a SharePoint list using PA - the form is used for people in my organisation to book slots on a training course. It's a simple list and users can only edit two fields; Name (people picker) and Status (DDL either Vacant or Booked). Everything works well until someone wants to cancel their slot and remove their name. When clearing out the Name field and hitting Save, the field is repopulated with the name that was originally saved there. The name can be overwritten with a new value, but it can't seemingly be deleted. Has anyone else experienced this or found a way to solve it? Thanks
Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @MarkP,

    Could you please share a bit more about your issue?

    I have made a test, and the issue is confirmed on my side. It seems that if you clear value within the Person field (Combo Box control), PowerApps would think you don't make any changes to the Person field.

    The user @AnonyMouse has faced same issue with you, please check the following thread:

    https://powerusers.microsoft.com/t5/General-Discussion/Clear-DateField-and-Lookup-Column-value/m-p/136709

    I have post this issue to my product team, if the issue is solved, I would reply here.

     

    Best regards,

    Kris

  • systemcrash Profile Picture
    93 on at

    Got any update?

     

    I can't clear the value from a person field from SPL via PowerApps "OnSelect" event and I can't do it.

    Ex.:

    AssignedTo : Dexter, John

     

    Patch(
    MySPL,
    SPL_SelectedRecord,
    {
    AssignedTo: Blank(),
    strAssignedToEmail: ""
    }
    );

     

    Running that code clear the strAssignedToEmail field but doesn't do anything to the AssignedTo field (which is a person or group field)

     

    It doesn't give any error...

     

    Some help or update on issue about Clearing out people picker field from SLP would be appreciated.

  • MarkP Profile Picture
    4 on at

    Hi Kris,

     

    Thanks for the response...

     

    There's not really much else I can share about this one, it's a simple SPL with customized PA form. We need users to be able to clear their names from the Person field and save it back to the list if they are no longer able to attend a session they had booked onto.

     

    I haven't tested whether this same issue is replicated in a canvas app...

     

    All the best,

    Mark

     

     

  • joshnystrom Profile Picture
    262 on at

    Hi all, I found a way to clear Person/People picker fields that doesn't rely on experimental features, nor a Flow, so I thought I'd surface it here. I'm not yet sure if the same approach will work for DateField, LookUp or Group Picker, but hopefully!

    My current understanding of my approach makes a few assumptions (I'm not certain whether they are integral to its use):

    -You are treating this like a "Complex" data update and are therefore using Patch statements to merge into the existing SP List item
    -Your app has a way to detect when the person-picking control was left blank so that you can conditionally change which Patch statement is being executed

    -You are using the out-of-the-box people picker or can otherwise tweak my approach to match a "valueless" Person record

    All I've done is prep a "BlankPerson" "BlankPeople" variable that is manually shaped as a single tabular, blanked-out Person People record for the SP PersonPeople/Group (multiple selection) field, as follows:

     

    Set(BlankPerson,Table({'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",Claims:Blank(),DisplayName:Blank(),Email:Blank(),Department:Blank(),Picture:Blank(),JobTitle:Blank()}))
    Set( BlankPeople, Table( { Claims: Blank(), DisplayName: Blank(), Email: Blank(), Department: Blank(), Picture: Blank(), JobTitle: Blank() } ) );

    When Patching with this as my payload when the People picker control is left blank, I've been able to Clear the corresponding field on my SP List item.

     

    Hope this helps someone!

    Josh

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

    @joshnystrom 

    Awesome find!!!

    Yes, this works on Lookup columns as well (Id:Blank(), Value:Blank())

    No luck on choice or date columns so far...

     

    Good work!!

  • joshnystrom Profile Picture
    262 on at

    Thanks for confirming this for LookUp columns @RandyHayes! If I get a chance, I'll see if I can rework this for Choice and/or Date columns as well and keep this (and some of the other related threads) posted with my results.

     

    Cheers!

  • joshnystrom Profile Picture
    262 on at

    Okay, I've done more investigation on what is possible with this approach and here is a (hopefully) simple rollup:

    You can reliably clear People (multi-select person picker), Choice and Lookup (but still not Date) fields as follows:

    Set each corresponding "blank" variable ("People" is a Table, the others are individual Records)

    Set(
     BlankPeople,
     Table(
     {
     Claims: Blank(),
     DisplayName: Blank(),
     Email: Blank(),
     Department: Blank(),
     Picture: Blank(),
     JobTitle: Blank()
     }
     )
    );
    Set(
     BlankChoice,
     {
     Id: -1,
     Value: Blank()
     }
    );
    Set(
     BlankLookup,
     {
     Id: -1,
     Value: Blank()
     }
    )

    And merge-patching the target list item like so:

    Patch(
     'Test List',
     {ID: ItemID},
     {
    	 PeopleField: BlankPeople,
     ChoiceField: BlankChoice,
     LookupField: BlankLookup
     }
     )

    That's all I have so far. I still haven't tested Groups but I suspect they would work fine.

    Good luck!

    Josh

     

     

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

    @joshnystrom 

    SWEET!!  Great work!

  • Community Power Platform Member Profile Picture
    on at

    How do you use BlankPerson in the Patch? I tried this without any luck, Owner being the Sharepoint Person or Group Field.

     

    Set(BlankPerson,Table({'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",Claims:Blank(),DisplayName:Blank(),Email:Blank(),Department:Blank(),Picture:Blank(),JobTitle:Blank()}));

    Patch(Hardware,First(Filter(Hardware,ID=ThisItem.ID)),{Owner:BlankPerson})

     

    Also tried:

    et(BlankPerson,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",Claims:Blank(),DisplayName:Blank(),Email:Blank(),Department:Blank(),Picture:Blank(),JobTitle:Blank()});

    Patch(Hardware,First(Filter(Hardware,ID=ThisItem.ID)),{Owner:BlankPerson})

     

     

     

     

  • FrancisL Profile Picture
    61 on at

    I also have tried everything and I am unable to Patch an empty/blank Person to SPL.

    Please this is something we really need. Any news on when we can get this working?

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard