Hi,
the script puts value (if not empty) of ‘Update Mapper Schedule Name - To Paste’ field to the field “Name”. If you trigger by checkbox, you can use this record values if the left part, together with ID and omit querying at all.
So you need just 3 lines:
set table
get config, can be done by: let {id, topaste}=input.config()
then
if (topaste) …do_update…
optional, fourth line console.log(result)
To be honest, you don’t need script at all, you would better do it in UI with conditional action.(and even simple action, moving ‘topaste’ check into trigger ‘When record matches condition’)