Create a Static Variable
Create a static variable when you need a variable with a value that doesn't change, for example, minimum credit score or preferred credit score.
After you define and save static global variables, they're available for you to add to the semantic model's data filters or expressions.
In a semantic model, you create and define a static variable within an initialization block. You can't create and define a standalone static variable and then later associate it with an initialization block.
A static variable must have a default value that is a numeric, character, date, time, or timestamp value. If you initialize a static variable using a character string, enclose the string in single quotes ( ' ). You can use the Expression Editor to insert the Date, Time, or Timestamp constants.
- On your home page, click Navigator
and then click Semantic
Models. - In the Semantic Models page, click a semantic model to open it.
- Click Variables
. - Click Create
and then click Create Initialization
Block. - In Create Initialization Block, go to the Name field and enter an initialization block name.
- Go to the Type field and select Static. Click OK.
- Confirm that the Variables tab is displayed and then
click Add Variable
and enter a unique name. - Go to the Value field and enter a static value. Or, click Detail View and click Open Expression Editor to create an expression that determines the static value.
- Click Save.