简介
Remove Variable 组件与 Set Variable 组件的作用相反,Remove Variable 组件的作用是删除 message 中的一个指定变量。
操作配置
参数配置
参数 | 数据类型 | 描述 | 是否必填 | 默认值 |
变量名称 | string | 要移除的变量名称 | 是 | 无 |
配置界面
![image-20210325145534545](https://qcloudimg.tencent-cloud.cn/image/document/16745760502a6279b047344a36bc4dc2.png)
![image-20210325145534545](https://qcloudimg.tencent-cloud.cn/image/document/16745760502a6279b047344a36bc4dc2.png)
输出
输出的 message 中,不再包括删除的变量。组件输出的 message 信息如下:
message 属性 | 值 |
payload | 继承上个组件的 payload。 |
error | 执行成功后,error 为空;执行失败后,error 为 dict 类型,包含“Code”和“Description”字段:“Code”字段表示错误类型,“Description”字段表示错误具体信息。 |
attribute | 继承上个组件的 attribute 信息。 |
variable | 上个组件的 variable 信息中去除删掉的变量。 |
输出示例
输入到 Remove Varaible 中的变量如下:
![image-20210426165649320](https://qcloudimg.tencent-cloud.cn/image/document/c2660b78547eb35328e840fdd0576ed0.png)
使用 Remove Variable 删除变量 name 后,如下所示:
![image-20210426165741239](https://qcloudimg.tencent-cloud.cn/image/document/53d555e1b1a4f2184859d5089406e825.png)
![image-20210426165649320](https://qcloudimg.tencent-cloud.cn/image/document/c2660b78547eb35328e840fdd0576ed0.png)
![image-20210426165741239](https://qcloudimg.tencent-cloud.cn/image/document/53d555e1b1a4f2184859d5089406e825.png)
案例
1. 添加 Remove Variable 组件。
![image-20210330172804271](https://qcloudimg.tencent-cloud.cn/image/document/02b989bfe5b9709d7bda632cb1590061.png)
![image-20210330172804271](https://qcloudimg.tencent-cloud.cn/image/document/02b989bfe5b9709d7bda632cb1590061.png)
2. 填入要移除的变量名称。
![image-20210330172924688](https://qcloudimg.tencent-cloud.cn/image/document/ee2f3f22a0216fa301a7895b40ce96d0.png)
![image-20210330172924688](https://qcloudimg.tencent-cloud.cn/image/document/ee2f3f22a0216fa301a7895b40ce96d0.png)