You need to sign in to do that
Don't have an account?

How do you handle a blank value in a datatable update?
I have inline editing available for a lightning datatable. I realized today that if you touch a cell but don't input any data, the update will fail with the message, "Value provided is invalid for action parameter 'target' of type 'LIST'".
Data being submitted. The bold/italized is the cell that was touch but no data was entered.
{hct: "", Id: "blahblahblah"}
Thanks.
Data being submitted. The bold/italized is the cell that was touch but no data was entered.
{hct: "", Id: "blahblahblah"}
Thanks.
Thank you for the suggestion. I realized I was way over thinking this. I was already looping through draftValues array to add a non-edited field from the data array to draftValues array. (This is necessary for calculations on the back end.) So in the loop I just added if statements to change edited fields without numeric values to zero. Lightning does check to see if the data entered is the appropriate type but does not take in to consideration if the field is blank.
Jim