I would like to clear field/column value on click of a button for a particular item. I have a SharePoint Person type field (AssignedTo). I have tried using Patch and Blank function but it is not clearing the value. Currently, the AssignedTo value is set to a single user.
Patch(Bookings, First(Filter(TaskList, BrowseGallery1.Selected.ID = ID)),{
AssignedTo:Blank()
}
)
I have tried ClearCollection function and UpdateContext({ReservedBy:""}) but that didn't work as well.
I have the same issue. Can't clear that field using PowerApps.If you find something, please let me know. 🙂
Hello Guys,
From my understanding, it looks like you would like to set a sharepoint field to blank, or null.
Here's what I did:
Set the input box to a variable(varFieldReset), then use OnSelect/OnChange to UpdateContext({varFieldReset:Blank()})
When you patch your field, it'll change it to Blank()
Let me know if that worked for you
I would try it, however we are dealing with a lookup of type "People" so now sure where to change that without getting an error. I guess one of the main problems is using this Lookup, since you can't customize it too much and still have expectations to work properly.
For example I have a column of type People and in my Edit Form, by default I want it to bring the default value, which is set. Now if I want to bring other values for selection, I don't know how to change that and keep the setting ok (since the lookup column has multiple field when it comes to it's source).
So if I just delete and submit form, it actually never deletes. Even worse... I have other fields taking value from there, for example a couple of Single Line of Texts, that takes FullName and Email from the person you are selecting. If I delete the selection, the fields appear blank, but when submiting the form, they actually don't submit a blank in the single line of text since the Lookup field, never actually get's a blank to submit.
Well, in order for you to get a blank one, what I did was create a blank item in Sharepoint list. Leaving this one blank would allow you to select blank as an option. Please use this only if a blank entry doesn't effect your data.
Now, for the other issue, you will have to set the default as a variable (PersonFullNameVariable and PersonEmailVariable).
Now for the Lookup dropdown box, use the "If" statement in the OnChange box to UpdateContext of the variable.
If(PersonLookup.Selected.Value=Blank(), UpdateContext({PersonFullNameVariable:Blank(),PersonEmailVariable:Blank()}),UpdateContext({PersonFullNameVariable:PersonLookup.DisplayName,PersonEmailVariable:PersonLookup.Email})
This way you what changes will be according to the variable. You'll also need to patch those changes to those columns as well otherwise, your changes will be done for nothing.
Hope this helps!
One last question:
Does this apply to lookup fields not dropdown? As my field is not a dropdown, is a people finder.
Looks like the reply is not respecting threaded conversation :). Thanks for your reply but UpdateContext ({AssignedTo:Blank()}) doesn't clear out the value of a People picker field.
I am still not able to figure this out. Is it not supported at all ? Can I please get an official response in that case?
What is the "Input" box? None of the fields in Advanced menu have that title.
Just ran into this problem and appear to have a working solution. Reading through a different post for Flow they were able to reset the field by using a -1. Try:
Patch(Source, Record, { Column: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Id:-1, Value:""} })
User | Count |
---|---|
137 | |
128 | |
75 | |
73 | |
69 |
User | Count |
---|---|
220 | |
135 | |
78 | |
58 | |
55 |