cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
danielleruns
Level: Powered On

ComboBox Isn't saving Empty Value

I have a problem I'm trying to troubleshoot/solve for. I have a ComboBox on an Edit form with a bunch of values, but if I try to clear the value from the control and save the form, it doesn't actually save it as blank.

 

I had hoped the NoSelectionText property would fix that but having " " in there doesn't seem to do anything. 

 

Does anyone have a fix for this?

1 ACCEPTED SOLUTION

Accepted Solutions
danielleruns
Level: Powered On

Re: ComboBox Isn't saving Empty Value

I found a much easier solution yesterday, just now getting around to following up. The tips in the following blog post worked like a charm:

 

https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-dat...

3 REPLIES 3
shailendra74
Level: Powered On

Re: ComboBox Isn't saving Empty Value

Set the Reset property to true.  and call Reset(combobox) at the point where you want to clear the combobox.

 

Thanks.

Community Support Team
Community Support Team

Re: ComboBox Isn't saving Empty Value

Hi @danielleruns ,

Actually, it is an known issue with LookUp, Chice and Person field within the Edit form in PowerApps. Currently, we could not clear LookUp, Choice and Person field value within the Edit form via clearing the original selected values within the ComboBox.

Plese check the following thread for more details:

https://powerusers.microsoft.com/t5/General-Discussion/Clear-DateField-and-Lookup-Column-value/m-p/1...

 

The user @joshnystrom has also provide an alternative solution to fix this issue, please check the alternative solution within above thread.

 

On your side, please consider take a try with the following workaround:8.JPG

 

9.JPG

Set the OnStart property of the App control to following:

Set(
    BlankPerson,
    Table(
        {
            Claims: Blank(),
            DisplayName: Blank(),
            Email: Blank(),
            Department: Blank(),
            Picture: Blank(),
            JobTitle: Blank()
        }
    )
);
Set(
    BlankChoice,
        {
            Id: -1,
            Value: Blank()
        }
);
Set(
    BlankLookup,
        {
            Id: -1,
            Value: Blank()
        }
)

 

Within your Edit screen, set the OnVisible property of the Edit screen to following:

Set(IsClear, false)

within the Edit form, unlock the Choice field Data card which contains the ComboBox, then add a "Clear" button within it, set the OnSelect property to following:

Set(IsClear, true)

Set the DefaultSelectedItems property of the ComboBox to following formula:

If(
    IsClear,
    BlankChoice,     /* <-- If the ComboBox is bind to Person or LookUp field in your SP List, please reference corresponding variable from the OnStart proprety of the App control here */
    Parent.Default
)

If you want to clear the Choice filed value in your Edit form, please click the "Clear" button, then click the "Submit" button, the Choice filed value in your SP list would be cleared.

Note: I assume that the ComboBox that you mentioned is connected to a Choice field in your SP List. If it is LookUp field or Person field, please reference corresponding variable value from the OnStart property within above formula.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
danielleruns
Level: Powered On

Re: ComboBox Isn't saving Empty Value

I found a much easier solution yesterday, just now getting around to following up. The tips in the following blog post worked like a charm:

 

https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-dat...