web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Erase information from...
Power Apps
Answered

Erase information from a choice

(0) ShareShare
ReportReport
Posted on by 29

 

Hello everyone

I have in the App an editable form referring to a product, in this form the user can change the name of the responsible seller (connected to a column in the SP List, which is of type Person) and the status of the products (connected to a column in the SP List, which is of the Choice type).

I want to perform a specific action: When the user changes the status (Choice type) to "Free" (in DataCardValue_Status) I would like the Seller's name to be deleted and become blank (the DataCardValue_vendor would be empty).
I tried the code:
On Datacardvalue_status in OnChange I did "if (datacardvalue_status =" Free ", Reset (datacardvalue_vendedor))" but that did not delete the SP List salesman's name.
Would anyone have an idea of what I can do?

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @santpaiva 

    Remove the OnChange actions and the Reset function you have and instead set the DefaultSelectedItems property of the combobox that you want to be cleared to the following:

       If(datacardvalue_status = "Free", Blank(), Parent.Default)

     

    Also, in order to write back the blank value to the list, make sure you have the Formula-level error management option turned ON in your advanced settings.

     

    I hope this is helpful for you.

  • santpaiva Profile Picture
    29 on at

    My Formula-level error management was turned off, initially.
    I used your code and he deleted the name of the seller only on the app screen but not in the SP List.

    Then, when I turned on Formula-level error management, the application started to show several errors and did not fulfill the functions it used to do, nor did I delete the salesman's name on the screen (as his code did when it was turned OFF)

    As I already said, your code partially fulfilled the function and erased the name of the seller on the app screen but did not update the database. Because of that, wouldn't you know any other way for me to just throw this update on the list now?
    I already use an editable form that in theory should change the SP List but that doesn't happen.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @santpaiva 

    The ONLY way you can set a column to blank in your list will be to have the Formula-Level error management on.

    If you turn it on and it shows issues elsewhere in your app, you should focus on fixing them - because they are real errors!

     

    If the blank value was not written back to the list WITH the formula-level error management on, then my question would be, what is the Update property of the Datacard that this field is in?

  • santpaiva Profile Picture
    29 on at

    The blank value was written back to the list with the formula-level error management on, but as I said, when this option is on, there are several errors in the application that I don't know how to solve, so I would like to save the blank value in the list by another way.

     

    Are you sure that it is not possible to update the list with another function? In another situation I managed to do this with PATCH but now I'm not able to apply for this case of leaving it blank.

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @santpaiva 

    It is NOT possible to set a column to blank without the Formula Level error management ON.  

    You cannot use Patch, Update, SubmitForm or any other function to blank a column without that option on.

     

    I would strongly advise to focus on the issues that are in error when that feature is turned on as those are REAL errors that should be fixed.  If you have difficulty figuring out how to fix them, then please post the problems to the forum here to get them resolved.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard