Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To make price list field/column editable

  1. Modify the calculation logic:

    1. Set the underlying logic element property "Allow Override" to True.

      • This is because behavior of price list column is driven by logic element properties

    and result value
    1. If you want to offer the user a dropdown with a list of options, rather than an editable text field, you can configure this using the AttributedResult.withManualOverrideValueOptions() method.

    2. To retrieve the user-entered value in any logic element, use the api.getManualOverride() method.

  2. Deploy the modified calculation logic.

  3. Recalculate the complete price list/grid to ensure this change is applied.

Note

Important Code Considerations:

  • When the If a user manually overrides the result value, the code of the logic element will not get executed at all.

    which means, that in such editable/overridable element, you should not NOT perform calculations whose results are also needed in the subsequent logic elements and you do not pass the values directly as an output of the element, but in some other way, e.g.

    next time the system calculates the result for that specific price list item, the corresponding logic element, which would normally calculate the result, will be skipped and not executed.

    • In editable/overridable logic element code, avoid executing operations with side effects, such as initializing or modifying objects stored in api.global or api.local that are then utilized in subsequent logic elements.