如果你真的需要双引号,那么将引用的值附加到数组并将其转换为最后的列表可能更简单.该 ArrayToList功能会自动处理逗号为您提供:
#arrayToList(names)#
结果:
"Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","Uruguay"
旁注,如果单引号,'
即可接受,则更简单.跳过循环,只需使用QuotedValueList():
#quotedValueList(query_names.short_desc)#
结果:
'Tuvalu','Uganda','Ukraine','United Arab Emirates','United Kingdom','Uruguay'