One potential solution to address this issue is to implement a checkbox that allows the script to be applied conditionally. By enabling the checkbox, the operator will have the ability to modify the table values. However, when the checkbox is unchecked, the values will be automatically substituted with the script.
To implement this workaround, follow the steps below:
Add the checkbox to the form: Integrate a checkbox element into the user interface, allowing the operator to toggle its state.
Modify the script rule: Update the script rule to include the checkbox as part of the script context. This will enable the script to check the state of the checkbox and determine whether to overwrite the field values or preserve the operator's modifications.
Add the following condition to your script code: enclose it within an if statement to check whether the checkbox is ticked or not. This way, the script will only execute and potentially overwrite the field value if the checkbox condition is met.
This workaround provides flexibility for the operators to control when the script should be applied and when their edits should be preserved.