Updating items from another list based on fields from the current list edit form

i have a form that do come date calculations and based on specific action i need to update the total number minutes in another list with a new value.
can you please advise with proper solution for this?

Hello @MehmetMuhanna,

You can perform calculations with dates using the Moment.js library, see code examples in our documentation here.

And to update item in another list, use PnPjs. For instance, update item when the field value has been changed:

fd.field('Field1').$on('change', function(value) {
          Title: value

thank you very much @mnikitina but i have the following scenario:
i want to update a field called APPROVED based on a field called ATT_ID on the second list.
can you instruct me how to accomplish this?


What is the ATT_ID field type? Is it a lookup field? Is the value of this field unique?

thank you very much, i found the problem, it was my mistake.