cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnonyMouse
Helper I
Helper I

Clear DateField and Lookup Column value

I have a datefield and lookup column in my form. In the EditForm, after the user clears the datefield column and lookup column to an empty value and save the form, in sharepoint, it still retains the old value. How can I set these fields back to null?

15 REPLIES 15

Hey @oliverlpgmail, sorry, I never got back to this thread to fill in some of the more recent details:

 

My "BlankPerson" variable from above would be better named "BlankPeople".

BlankPerson should instead look like:

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

You have to use "BlankPerson" when your Person/Group field is set to single-select, and "BlankPeople" [with the Table() wrapper] when it is set to multiple-selections.

 

Hope that clears up your error!

Josh

Hi Josh,

Thanks for your response. It didn't work for me.

In my case the solution was to activate one of the "Experimental features". "Formula level error management". I found it in a blog by Greg Lindhorst. Then the SubmitForm is able to empty a User field. If I want to use a PATCH then I simply do this:

Patch(
Bokning;
{ID: _selected.ID};
{Person: Blank()}
);;

Hi Oliver, 

 

I was trying to clear the person field and the above solutions with patching with Blank() values to user attributes din't work for me.

Just by activating the experimental feature "Formula Level error management" as you suggested, both the below approaches of clearing the person field are working

1. Form submit with a cleared person choice field

2. Patch (Source,Item,{PersonColumn:Blank()})

 

Thanks a lot!

Cheers!

Anonymous
Not applicable

i_power
Advocate I
Advocate I

(Almost a year later) I believe these solutions do not work. I tried Patch with Blank()s and with a BlankPerson variable and I couldn't find the experimental features setting.

 

Moreover, my ComboBox is in a gallery and as soon as I try any of these solutions, it creates some endless loop or something that causes my app to keep spinning and hanging with the "Please wait..." message. It takes hours trying to get control of the app again and usually what I have to do is delete the ComboBox altogether.

 

Looks like the only real "solution" is to avoid this with workarounds 😞

I had the same issue and also fixed with the Experimental feature. Hopefully it does not change or gets deprecated.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (18,637)