automation - 如何附加到 Automation Anywhere 10.5 中的列表?
问题描述
列表开始为空。然后,如果满足某些条件,我想为循环中的每次迭代附加一个值。我在变量操作中看不到附加选项。
解决方案
您可以为此使用字符串拆分,假设您知道一个永远不会出现在您的值列表中的分隔符。我使用了分号,并且 $local_joinedList$ 开始为空。
If (certain condition is met)
Variable Operation: $local_joinedList$;$local_newValue$ To $local_joinedList$
End If
String Operation: Split "$local_joinedList$" with delimiter ";" and assign output to $my-list-variable$
这将覆盖 $my-list-variable$。
如果您需要追加到现有列表,您可以先使用 String Join 以相同的方式执行此操作,将您的值追加到字符串,然后再将其拆分。
String Operation: Join elements of "$my-list-variable$" by delimiter ";" and assign output to $local_joinedList$
推荐阅读
- asciidoc - 在单独的部分写脚注
- python - 如何在没有错误的情况下替换文本中的“攓ø”和“å”:“ascii”编解码器无法解码位置 0 的字节 0xc3
- javascript - 简码未在 wordpress 中显示地图?
- python - 当我制作字典时,Pandas 仍然将整数转换为浮点数
- sql - Symfony SQL 有时没有结果
- r - 计算特定行模式的平均值
- javascript - 合并两个独立的 GatsbyJS 入门主题
- python - 数据类型“S7”是什么意思
- python - 如何识别字典中是否存在某些键?
- c++ - VSCode IntelliSense 提出了一个 .h 文件,但将其标记为未找到