cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Updating SharePoint with a Blank Person record does not update the SharePoint list

Hello,

 

I have an issue that seems like it should be rather common to fix.  I am using SharePoint as my data source.  The scenario is, basically when a person no longer has an assignment, they need to be removed and that should update in SharePoint.

 

My issue is that the user can be blanked out in the default combo box control in PowerApps but when the record updates the change to a null value does not propagate back to SharePoint.

 

To get around this issue I have tried many things and I will describe the one that seems like it should by all means work.

1. I have created a Blank Person record variable in my PowerApp at the initial app level

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

2. I then check for a change to blank in the default combo box control in the On Change property.

If(IsBlank(ProjectManagerDataCardValue.Selected.DisplayName),
     UpdateIf(MyList, ID = varRecord.ID,
     {'Project Manager': BlankPerson}
);

 

I run the code and X out the assigned Project Manager.  The code runs successfully, which I know because I set a variable in the next line of code in the block and I display that value which does change.  So I know it runs well.  There are no errors registered.

 

I refresh my page and the old Project Manager value is still showing.  When I check SharePoint, no change has been applied.

 

Am I approaching this incorrectly?  Or is this a known bug?  Or does anyone know how to make this change reflect in SharePoint after being removed in PowerApps?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@DDucolonSBUX 

Make sure you have Formula Level Error Management on in your advanced settings - otherwise you will not be able to change to a blank person.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

@DDucolonSBUX 

Can you please try to replace this code...

{'Project Manager': BlankPerson}

 

...with this code?  Blank() is typically how you would PATCH an empty value.

{'Project Manager': Blank()}

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted

I have tried that before and I just replaced my blank record with the Blank() function again and tried it. And still no change in SharePoint.  I am trying to execute this with the On Change event.

If(IsBlank(ProjectManagerHeaderDataCardValue.Selected.DisplayName),
     UpdateIf('Proposal Intake', ID = varRecord.ID,
	{'Project Manager': Blank()}
);

FYI, I have also tried to use the Patch command and as you see the UpdateIf command and neither seem to be able to update SharePoint.  Since Project Manager is a complex data type (Person or Group set to a single value) I also tied setting this via Patch with a complex field update.

Patch(
	'MyList',
	varRecord,
	{'Project Manager': {
	'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
		Claims:Blank(),
		DisplayName:Blank(),
		Email:Blank(),
		Department:Blank(),
		Picture:Blank(),
		JobTitle:Blank()
		}
	}
)

 So any idea on how to update Sharepoint Person field from PowerApps with a blank or null value?

Highlighted

@DDucolonSBUX 

Make sure you have Formula Level Error Management on in your advanced settings - otherwise you will not be able to change to a blank person.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Highlighted

Thanks so much!  This has really fixed my issue and gotten me unblocked.  You Rock!!!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,554)