Expressions
Used in:
- File storage category filters
- Print form filters
- Collection filters in FormBuilder
- Expressions in FormBuilder
The syntax is the same, but the context (set of available variables) differs
Useful links
Expression syntax (library used)Boolean algebra logic — truth table (conjunction) and logical operationsBoolean algebra (wiki)
Available variables (do not affect loading speed)
| scope | Which page we are on. Options: **client, loanApp, contract, depositContract, shareContract** |
| clientId | |
| loanAppId | |
| contractId | |
| depositContractId | |
| shareContractId |
Variables with lazy loading (affect loading speed)
| loanApp All properties from the model, as well as:
Example 1: 3 collaterals, 2 of them are registered to 1 client, the result will be 2 depositors. Example 2: clients in loanApp.coborrowers can technically be duplicated, but loanApp.coborrowersQty will return the number of unique records |
| contract |
Try to use properties from as few objects as possible, since each request increases loading time
Examples
| Expression | What happens |
|---|---|
| loanApp.collateralQty > 5 && loanApp.loanAmount >= 500 || contract.forIssue == true | (Number of unique collaterals > 5 AND Loan amount is greater than or equal to 500) OR (Contract for issuance) |
| loanApp.coborrowers.count() > 5 | Number of co-borrowers > 5 |
| loanApp.coborrowersQty > 5 | Number of unique co-borrowers is greater than 5. Technically, co-borrowers in the collection can be duplicated |
| loanApp.hasCollateralTypes([1,2,3,4]) | Application has collateral from the list of types |
| false | Will always be hidden |
| scope == 'client' | Form will be available only on client |
| scope in ['client', 'loanApp'] | Form will be available only on client and application |
| scope not in ['client', 'loanApp'] | Form will be unavailable on client and application |