◷ Reading Time: 3 minutes
What is a Boxed Expression?
Boxed Expressions is a business glossary document that has only formulas definition. Boxed Expressions enable reusability of equations across different models. Using boxed expressions, you can create the building blocks of your logic or rules and then allow them to be used and shared in various places.
if you have an SQL query that can be used in multiple documents, you can add the query as a boxed expression and reuse it easy.
A Boxed Expression is a two-column table: The first column is the name and the second column is the value or expression. There are several types of value expressions as follows: Literal (constant) expression, Function definition, and Invocation.
There are two main types of Boxed Expressions:
- Value formula – these are expressions that represent some values.
- Function formula (i.e., value formula with parameters).
To add a new Business Glossary document,
Document Types --> Business Concept --> Boxed Expressions
Once you added an expression, this will be the window.
Boxed Expression Properties
- Name: Name of the glossary
- Variable Definition: Define variables to be used in the glossary
- Types Definition: List of Types and Functions
It will only have one item which is Formula.
At the top menu, you can see the following items.
- Add a formula: Add a formula to boxed expression
- Delete the selected item: Delete a formula
- Properties: Properties of the glossary
- Filter: Search a formula in the glossary
If you click on an expression, the formula property window will appear.
- Name: Name of the formula. This name will be used throughout the documents to refer to the expression.
- Expression: Expression of the formula
- Type: Type of the formula’s expression result. The default is Expression. The other option is List which will translate the result into a list.
- Parameters: If there are parameters used in the expression, define them here
- Description: Description of the formula
Referencing Boxed Expressions
It is similar to referencing a Business Glossary.
Referencing a formula
- Open the decision table you want to use a formula from boxed expressions.
- Refer the boxed expressions file.
- Select a column.
- Under Properties window –> Value, you will see a property called ‘Expression’.
- Enter the formula name you want to use.
Similar to the decision table referencing, the ‘Term’ property is available under the Properties window.
Press Control + Space in the keyboard and the options can be viewed.
Sample Boxed Expression
A sample boxed expression file can be downloaded from the attachments at the end of this page (BoxedExpression.txt).