...
Written by: |
Input Input Generation mode was previously call called Syntax Check mode.
Our formulas Logics are used to calculate the results but at the same time also serve as configuration mechanism to drive certain UI elements, such as necessary input parameters.
Logics That Trigger Input Generation Mode
- Dashboards
- Price Grid Line Item
- Price list Line Item
- Quotes Line Item
- Calculation Grid Line Item
- Contract Line Item
- Rebate Line Item
- Compensation Line Item
- Claim Line Item
- PA Dataload
- PA Distributed Dataload
Input Generation Mode
To avoid the need to declare input parameters explicitly (they show up as you start using/expecting them in the formula), a mechanism called “input generation mode” is used (sometimes also called "dry run").
...
Code Block |
---|
def inputVal = api.userEntry() if (api.isInputGeneration()) return; def costs = api.find("PX", equal("name", "costs")) |
Note:
apiout.getElement()X
will return always a BigDecimal number, regardless of its value returned during regular execution of the logic.Also some other functions will return "null" instead of proper values.
api.stream
andDatamartContext.streamQuery()
are not supported in input generation, butapi.find
is.
...