1

I am tried many ways to clear the filed in SharePoint list using PowerApps and make it null on the record. but unfortunately, I could not do that.

first way I tried :

Set(
BlankPerson,
Table(
    {
        Claims: Blank(),
        DisplayName: Blank(),
        Email: Blank(),
        Department: Blank(),
        Picture: Blank(),
        JobTitle: Blank()
    }
)
);

Patch(
    'InvoicePaymentRequests',
    {ID: InvoicesListGallery.Selected.ID},
    {SecondApprover: BlankPerson()}
);

I am getting mismatch data type (Record - Table)

Second way I tried

Patch(
    'InvoicePaymentRequests',
    {ID: InvoicesListGallery.Selected.ID},
        {
            SecondApprover: {
                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                Claims: Blank(),
                DisplayName: Blank(),
                Email: Blank(),
                Department: Blank(),
                Picture: Blank(),
                JobTitle: Blank()
            }
        }
);
Refresh(InvoicePaymentRequests)

this one it is running but will not clear the field value on the list.

Third way

Patch(
    'InvoicePaymentRequests',
    {ID: InvoicesListGallery.Selected.ID},
        {
            SecondApprover: Blank()
        }
);

also did not work

any suggestions?

thanks and best regards

2
  • any idea of how to solve this?
    – David Mora
    Commented May 19, 2022 at 19:48
  • See my answer below, I have solved this
    – klip28
    Commented Dec 22, 2022 at 15:03

4 Answers 4

0

If you don't provide a value for the People picker box (a Combo Box control) when you edit a record within the Edit form, PowerApps Edit form would think that you don't make any changes to the People Picker column (Person column), so the old value within the Person column would not be changed.

Currently, I afraid that there is no way to clear the People picker box value (Person column, decorated as a Combo Box control) within the Edit form in PowerApps.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum.

0

I believe I have this working in one of my apps. My method is very similar to what has been tried in the question. The key difference I see is that I'm using an empty string for my Claims field instead of Blank()

I have created a variable varBlankPerson using this formula:

Set(
    varBlankPerson,
    {
            DisplayName: "-None-",
            Email: "",
            Department: Blank(),
            Picture: Blank(),
            JobTitle: Blank(),
            Claims: ""
        
    }
);
0

Sorry that it took so long to respond to this

Here is how you can accomplish this


Let's say you have a people picker column called FirstPersonColumn (PEOPLE PICKER)

Just put another column on your list called BlankPerson and make it a people picker field (you would never use this column, it's always blank). Then just patch your first people picker column to the BlankPerson value

UpdateContext({_loc_blankPerson:Lookup('YourList',ID = <ID OF ITEM>, BlankPerson)});

Patch('YOURLIST' ,LookUp('YOURLIST',ID = <ID OF ITEM>),
{
'FirstPersonColumn': _loc_blankPerson

});
 

This also works for multi-people picker too, your BlankPerson column just needs to also be Multi Select

so, you can just have 2 blank PeoplePicker columns, 1 for single, 1 for multi people picker. You just never use them and you can hide them

0

@klip28, your suggestion for creating another person column in the list works great!

My button had this code originally which was not clearing out the "Current Approver" value:

Set(
    varCurrentApprover,
    {
        Claims: Blank(),
        Department: Blank(),
        DisplayName: Blank(),
        Email: Blank(),
        JobTitle: Blank(),
        Picture: Blank()
    }
);

I changed it to this:

Set(
    varCurrentApprover,
    LookUp(
        'Event Budget Requests',
        ID = ThisItem.ID, // Match the current item by its ID
        'Current Approver Reset' // Retrieve the "Current Approver Reset" field value
    )
);

THIS WORKED! Thanks for the solution!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.