脚本参数
触发器脚本使用参数促进脚本重复使用,而不是通过在其中硬编码值来限制脚本。
参数行放置在说明代码块之后。以 @param 开头的备注行定义脚本参数。@param 后的第一个单词是字段类型 (String、Boolean 和 MultiString)。
字段类型后的其余文本是参数的名称。在 PTC RV&S 管理客户端 中,参数名称显示在“参数”选项卡上。在下一个 @param 或备注末尾之前的备注行将显示为参数的工具提示。
例如,以下脚本代码:
// @param String Priority Field Name
// The name of the field which contains the priority to be escalated.
// The field must be of type integer or a pick field.
其中,String 是字段类型,Priority Field Name 是参数名称。“参数”选项卡下的“优先级字段名称”字段,将显示一个工具提示,其中说明“The name of the field which contains the priority to be escalated. The field must be of type integer or a pick field.”。
相关主题