How can the edited field value be preserved if it is being overwritten by the script in Vantage?


In situations where it is necessary to correct certain field values even after the script rule has been applied, there may be a challenge as the field value gets overwritten consistently when attempting to modify it. The question arises whether it is possible to edit the field value despite having a script rule enabled to modify its value.


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:

  1. Add the checkbox to the form: Integrate a checkbox element into the user interface, allowing the operator to toggle its state.
  2. 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.
  3. 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.
    if(!Context.GetField("Modify LI").Value)

This workaround provides flexibility for the operators to control when the script should be applied and when their edits should be preserved.

Have more questions? Submit a request



Please sign in to leave a comment.