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
Phuc 2Phuc 2 

LWC datatable draft values

Hello,
Will someone help me with how do I get the row field values when a user updates a field?
I want to take the value from an updates field and multiply it by a value from another field(same row) and take the calculated value and put it into another field(same row).
I just need the syntax for getting the field values of the row.
I need to get this resolved so any help is greatly appreciated.

Best Answer chosen by Phuc 2
GulshanRajGulshanRaj
Hi,

Please refer this official salesforce guidelink and checkout Row-Level Actions here  :https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation

User-added image

Thanks
Gulshan Raj (https://forceblazer.com/)

All Answers

GulshanRajGulshanRaj
Hi,

Please refer this official salesforce guidelink and checkout Row-Level Actions here  :https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation

User-added image

Thanks
Gulshan Raj (https://forceblazer.com/)
This was selected as the best answer
Phuc 2Phuc 2
Thank you for the reply Gulshan but not sure how this applies. 
I only want 1 field in the row to be editable and I need to grab the vlaue of another field in teh same row and then populate another field on the same row. 
This need to be done on 'oncellchange' since I am using the draftvalue of the edited field.  Can I get the field value of the other fields  using: 
const row = event.detail.row;
Thank you,
P

 
Andrea EmetAndrea Emet
https://salesforce.stackexchange.com/questions/336305/usage-of-draftvalues-and-getrecordnotifychange
for get record in onchange event this.template.querySelector('lightning-datatable').draftValues 
and get field from another field onchange event and you can handle in map