+ Start a Discussion

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"}

AnudeepAnudeep (Salesforce Developers) 
Unsure if it helps but found this post with the same error message. There was a known issue around this. You might want to contact support

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.