Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

When the user needs to be able to modify the value calculated in a price list/grid column, you can make the field editable.

The value calculated by the logic element can be then manually overridden in the user interface of price list/grid, provided the user has an appropriate role which grants the access and the price list is not locked (e.g. is not in submitted or approved state).

Configuration Steps

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.

      • See also “Allow Override” at page Add and Define Element.

    2. 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.

    3. 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.

Important Code Considerations:

  • If a user manually overrides the result value, the 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.

  • No labels