◷ Reading Time: 5 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.

For example,

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.

You can add different types of expressions as boxed expressions.

- Formula: To write formulas
- Literal: To assign constants and literal formulas (without any parameters)
- Function: To assign a function with a list of expressions
- Native Method: To assign .NET native methods

## Boxed Expressions

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

### Toolbox

The ToolBox contains the following expression types,

- Formula: To write formulas
- Literal: To assign constants and literal formulas (without any parameters)
- Function: To assign a function with a list of expressions
- Native Method: To assign .NET native methods

### Top Menu

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

### Expression Properties

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

### Decision Table

- 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.

### Natural Language

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*).