Hi Power Apps community,
I was hoping someone might be able to help, I've been trying to clear the value from a SharePoint Lookup Field using Power Apps.
The simplest way I can explain to recreate the steps are:
- Create a field in a SharePoint list that lookups a value from another list (in this case it's an address list) I have not made this a required field
- Set the new and edit form to use Power Apps, save and publish the app
- I go to modify an existing item that has a lookup and clear the lookup from the field
- Save the change and the lookup is still present.
This is actually related to a much larger app I'm creating but the above was the easiest way to explain how to replicate the issue. Essentially I need a way to set the field to Null, which I would in CSOM and all would be ok.
I've tried various methods e.g. using Blanks() and {} inside setting the value manually, e.g. below:
{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: Blank(),
Value: Blank()
}
At the moment the workaround I'm using is having a blank address in my address list and if I need to update a record to no longer be associated with an address I set it to this placeholder. It's not ideal and I would prefer to just clear out the lookup column!
Many thanks for any help,