Add and Define Element
You can add a new element of the calculation logic by clicking the Add button.
Make the necessary element settings in the columns. Select the Select Fields to Display option in the column context menu or the Show Table Settings menu to display columns that are not visible by default.
- Type – Specifies the type of the element. There are five options:
- Add – Adder / Markup (adding the element value to a price point). Calculation written in /wiki/spaces/KB/pages/99570116. Examples:
- Manufacturing costs as basis for the calculation.
- Regional adjustment to differentiate the prices based on regions.
- Industry specific adjustment to differentiate the prices based on customer industry.
- Subtract – Reduction / Discount (subtracting the element value). Calculation written in /wiki/spaces/KB/pages/99570116. Examples:
- Volume discount
- Customer classification discount (ABC-Customer classification)
- Result – Total or sub-total of elements. You cannot enter an expression as the total or sub-total is calculated based on the previous elements. Examples:
- List price
- Net price
- Info – Additional general calculated element. Calculation written in /wiki/spaces/KB/pages/99570116. Examples:
- Margin
- Contribution margin
- Total Discount (adding all single discounts)
Function  – Groovy element for complex calculations written in Groovy programming language.
Brick – Evaluates the given text as a formula. In this element you only provide the name of another element, which actually contains the string of the formula expression. You can, for example, retrieve a formula expression from the Company Parameters and then use this type of element to execute it. Example:
Type Element Name Element Expression Calculated Result Info
A 5 5 Info
B "A * 3 - 1" "A * 3 - 1" Brick
C B 14
- Add – Adder / Markup (adding the element value to a price point). Calculation written in /wiki/spaces/KB/pages/99570116. Examples:
Element Name – Identifies the calculation element. This is a mandatory field.
- Label – Optional value for the element. If no label is set, the element name will be used as the input/output name in the UI.Â
- Display Mode – Defines in which parts of the application the element is displayed. The options are: Price Grids, Price Lists, Quoting, Everywhere, Never and Integration. (Integration means the value is only available through the interface but not visible in Price Lists / Price Grids / Quotes. This is older concept not used much nowadays. The case there is, that a direct logic execution should see more logic outputs than the 'normal user'.)
 The setting Never affects also warning messages from api.addWarning. These messages are then displayed with the next visible element (if there is any). - Format Type – For elements displayed in Quoting defines the formatting based on type:
- Numeric – Maximum three decimals are displayed (e.g., 2.123 or 3.32 or 4.1).
- Integer – A whole number, without decimals.
- Numeric(long) – Maximum nine decimals are displayed (e.g., 1.123456789 or 1.2345).
- Money – Two decimals are always displayed (e.g., 1.20 or 1.12).
Money (EUR)... (JPY) – Always two decimals are displayed and the corresponding currency symbol (e.g., €1.20 or €1.12 or $1.20$ or $1.12).
 This is only a format. Values are NOT converted into another currency.
- Percent – Two decimals are always displayed together with the percentage symbol. The value will be multiplied by 100, i.e., 0.1234 is formatted into 12.34%.
- Text
- Link
- Matrix or Charts
- Sparkline – Displays the data as a small inline chart that presents the general shape of the variation. The element result must be a comma-separated list of numerical values. The values are stored inline, so a character limit applies depending on the column size. Sparkline is available in item grids for Live Price Grids, Price Lists and Simulations.
- Timestamp
- Date
- Suffix – Text (or text symbol) of an element defined here will be displayed in Quotes after the output value (e.g., if an element returns 3.1 and the suffix element returns 'EUR', you will see '3.1EUR' on the screen).
- Calculation Context – Used in Analytics, Rebate Agreement, Sales Compensation and Optimization Model logics to group the calculation into multiple phases.
- Condition – If you do not want to calculate this element under certain conditions, put here a name of another element, which, if returns 'false' (or 0, null, ""), will cause this element not to be calculated at all.
- Result Group – Allows you to group the results. Assign a group name (of your choice) to all the elements that you want to have in the same group. Elements with no value for this column will end up in the group called None. If this column is completely empty, no grouping takes place.
- Hide Warnings – If checked, warning messages (e.g., parameter not found) and system warnings are not displayed in Quoting and Price Lists.
- User Group – Defines what user group(s) will see the result of the element. The total length of the user group names cannot exceed 255 characters.
 This setting is supported only by Quoting and Price Setting. - QC: Summarize – If checked, the value will appear summarized for all products in Quotes.
- QC: Hide if null – If checked, the value will be hidden in Quotes in case it has no value.
- Allow Override – If checked, the value calculated by this element can be manually overridden in the user interface of Price List or Live Price Grid – provided the user has an appropriate role which grants the access and the Price List is not locked. This feature is also supported by Result Matrix (only plain values – styled cells, button cells, etc. cannot be overridden).
Timeout Override[s] – You can allow the element to be executed for longer time than default (5 s). The value means maximum number of seconds, which the logic in this element is allowed to run. After that, the calculation will be aborted and you will get the Timeout message.
Note:- The maximum timeout value is 900 s (= 15 minutes). If you enter a higher value, it is ignored.
- The timeout clock for an element starts when the element is called first time. So if you have subsequent elements eating up a lot of time, the called element can be timed out already before it is called a second time from another element. For library elements, the clock is reset on every new (logic) element.
- If the element calls an HTTP request, the httpCall method has the same timeout as defined for the element.
- If you set the timeout to "0 s", it is ignored and the default value is used.
- Override Parent Logic – Indicates whether the element, coming from a parent logic, has been modified. By changing the value to False and saving the logic, you can revert the changes. Available only for generic logics.
- Protected Expression – You can make an element's code hidden if it contains sensitive information. When a logic with a protected element is saved, the source code of this element will not be returned to the client in any subsequent fetch operations. Formula test drive will continue to work. Protected elements can be updated: sending null as formulaExpression and protectedExpression=true will keep the original code and change the other fields. The source code can also be updated if formulaExpression is not null. Protected code can never be revealed again (i.e., unchecking the option will not bring the code back).
- Exclude from Export – If set to True this element and its results will not be present on the Data tab of the exported XSLX file. In the same way you can exclude result matrixes that would normally be exported on a separate tab. This functionality can be useful if there are elements containing sensitive data in your logic. Available for exports from Quotes, Agreements/Promotions and Rebate Agreements. As this setting is part of the calculation results, recalculate the document before export.
Found an issue in documentation? Write to us.
Â
Pricefx version 13.1