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?
Solved! Go to Solution.
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.
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.
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.
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?
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.
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.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
185 | |
47 | |
46 | |
34 | |
33 |
User | Count |
---|---|
256 | |
86 | |
79 | |
68 | |
67 |