设定变量

一套 variable building block is used to set the value of a 变量. 变数 can be scoped to be available only in the same run of a case, across all cases in a run and even permanently for as long as the Project it is stored in exists.

见 使用数字和变量 lesson for examples on how to use 变量s.

完全扩展,集 variable block shows 以下属性:

集变量

The Block Header (“Set 变量”)

标题中的绿色输入连接器用于触发块 start executing.

The green output connector in the header triggers when the 变量 has been saved.

The title of the block (“Set 变量”) can be changed by double-clicking on it and typing in a new title.

变量名称

The name of the 变量. A 变量 name can contain any characters and it is case-sensitive.

The value of the 变量. Can contain tokens for field values (added below). Right-click and select “Insert token” to insert one or more field tokens.

文字栏位

添加任意数量的字段,这些字段可以包含动态内容,并且可以用作值中的标记。

范围

Set the scope in which to load this 变量.

  • “Only this case” means that the 变量 only exists during the execution of this one case, this one time. This is the default and usually most appropriate type.
  • “Schedule” means the 变量 will exist across all cases defined in a schedule during the same run.
  • “Permanent” means the 变量 will continue to exist permanently, day after day, even after hundreds of runs.

变数 of different scope are unique. This means that a 变量 named “test” with “Permanent” scope is not the same as a 变量 named “test” with “Only this case” scope.

 

更新 February 6th 2018