如何避免在附加字符串连接器逻辑应用程序中添加重复的字符串 [英] How to avoid to add duplicate string in append string connector logic app

查看:63
本文介绍了如何避免在附加字符串连接器逻辑应用程序中添加重复的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下json数组输入-

I have following json array input -

"results": [
  { "tableName" : "ABC","id":"11"},
  { "tableName" : "ZX","id":"11"},
  { "tableName" : "ABC","id":"11"}
]}

在逻辑应用程序中,我已经在For_each中使用了",我能够成功附加字符串,但是如何避免添加已经存在的字符串?像上面的例子一样,我当前的输出是- ABC,ZX,ABC 我想要-ABC,ZX

In logic app i have used `` in For_each I'm able to append string successfuly but how to avoid adding already present string ? like above example my current output is - ABC,ZX,ABC i want - ABC,ZX

推荐答案

您可以使用Array来实现,其中有一个

You could use the Array to implement, there is a union function to return a collection that has all the items from the specified collections. It will return a collection without duplicate string. Then use join action to return the string.

因为union函数必须至少包含两个集合,所以我使用了两个相同的集合.表达式是这样的:union(variables('tablename'),variables('tablename'))

Cause the union function must contain two collection at least, so I used two same collections. The expression is like this: union(variables('tablename'),variables('tablename'))

以下是结果.

希望这可以为您提供帮助.

Hope this could help you.

这篇关于如何避免在附加字符串连接器逻辑应用程序中添加重复的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆