NF9.1 Boolean Logic Enhancements
From iDempiere en
Feature: Boolean Logic Expression Enhancements
Feature Ticket: IDEMPIERE-4824
Description: Enhancements for boolean logic expressions (readonly, display and mandatory):
- Open and Close bracket support to define the evaluation order of logic expression that have multiple and/or combinations.
- add NOT ($!), <=, >= and Regular Expression Match (~) operators
- add Unit Test Cases for evaluation of boolean logic expressions
Usage of New Features
- Use open and close bracket to define evaluation order of expression.
- Example: @IsSummary@='N' & (@ProductType@=I | @ProductType@=S)
- Not/Negate operator: $!
- Example: $!(@IsLot@=Y & @M_LotCtl_ID@ > 0)
- Note that we can't use ! as the legacy code have been using it as the not equal operator.
- Greater than or equal to operator: >=
- Example: @IsLot@=Y& @M_LotCtl_ID@ >= 100
- Less than or equal to operator <=
- Example: @A_Asset_ID@<=1&@A_CreateAsset@='Y'
- Regular Expression Match Operator: ~
- Example: @Identifier@ ~ '^([a-zA-Z_$][a-zA-Z\\d_$]*)$'
- Note: to avoid parsing issues, always quote your regular expression with ' or ""
- It is fix to the format of <Input String> ~ '<Regular Expressions>', i.e you must always put your regular expression after the ~ operator.