cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmurray
Advocate I
Advocate I

Patch SharePoint person field to blank

Hi all,

 

Does anyone know please how to patch a SharePoint person field to blank?

I have the "Formula-level error management" experimental feature turned on.

The person field is single-select only.

I can successfully patch date and choice values to blank, but struggling with the person field.

I've searched this community and this is what I've tried:

Attempt 1:

 

Patch(
    'Business plan log',
    varRecord,
    {
        'Director name':
        {
            '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims:Blank(),
            Department:Blank(),
            DisplayName:Blank(),
            Email:Blank(),
            JobTitle:Blank(),
            Picture:Blank()
        }
    }
)
);

 

 

Attempt 2:

 

Patch(
    'Business plan log',
    varRecord,
    {
        'Director name':
        {
            Claims:Blank(),
            Department:Blank(),
            DisplayName:Blank(),
            Email:Blank(),
            JobTitle:Blank(),
            Picture:Blank()
        }
    }
)
);

 

 

Attempt 3:

 

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


Patch(
    'Business plan log',
    varRecord,
    {
        'Director name': varBlankPerson
    }
)
);

 

Attempt 4:

The above attempts with "" instead of Blank().

 

Any advice would be greatly appreciated, thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

For this to work you need to do two things.

1) For some reason the following code only works if you turn on Custom Errors under experimental features in Settings.
image.png

2) Once that is turned on you will be able to patch the person column with Blank().

Patch(
    'Business plan log',
    varRecord,
    {
        'Director name': Blank()
    }
)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User III
Dual Super User III

For this to work you need to do two things.

1) For some reason the following code only works if you turn on Custom Errors under experimental features in Settings.
image.png

2) Once that is turned on you will be able to patch the person column with Blank().

Patch(
    'Business plan log',
    varRecord,
    {
        'Director name': Blank()
    }
)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

cmurray
Advocate I
Advocate I

Thank you, thank you, thank you.

I already had the setting turned on, but this way of patching Blank() against the field worked perfectly. I appreciate your quick and thorough response.

@cmurray 

 

Patch(
    'Business plan log',
    varRecord,
    {
        'Director name':
        {
            Claims:Blank(),
            Department:Blank(),
            DisplayName:Blank(),
            Email:Blank(),
            JobTitle:Blank(),
            Picture:Blank()
        }
    }
)
);

 

The above approach works when the Person or Group field accepts Multiple Users.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,279)