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
prateek khanna 24prateek khanna 24 

Hi all, I have One question , If I have one field Amount if I want to change its Value by some Percent + or - , How to achieve this ?

Let,s say I have amount Its value is 2000 , ANd when I go to inline edit and I add +10% it should increase the value by 10% or -10% , then it should decrease the value by 10% in Lightning data table.
ryanschierholzryanschierholz
Static fields won't do calculations. However, you could add an 'Adjustment' field (as percent) and a 'Total' field (as formula). The formula would take the Amount field, multiplied by Adjustment (i.e. Amount * Adjustment__c) 

The Amount field of 2000 would remain the same and then when 10% or -10% is input to the Adjustment field, the Total field would reflect the desired amount. 
ryanschierholzryanschierholz
Another option would be to use a Screen Flow, which would take the adjustment percentage as an input, calculate the result and then write the new Amount to the record.