function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PugetSoundJimPugetSoundJim 

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.
 
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
PugetSoundJimPugetSoundJim
Anudeep, 

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