简体   繁体   English

逻辑应用程序从数组中的项目中获取前 5 个字符

[英]Logic App take first 5 characters from the items in array

I would like to be able to extract the first 5 characters from the element in the array in Logic App.我希望能够从 Logic App 中的数组元素中提取前 5 个字符。 I am able to generate the list (below image) but I need only first 5 characters not the whole name我能够生成列表(下图)但我只需要前 5 个字符而不是全名

在此处输入图像描述

and here is the result这是结果

在此处输入图像描述

Thank you:)谢谢你:)

Using substring function you can extract first five characters of the file name .使用 substring function 可以提取文件名的前五个字符 I have reproduced issue from my side and below are steps I followed,我已经从我这边复制了问题,下面是我遵循的步骤,

  1. Created logic app as shown below,创建的逻辑应用程序如下所示,在此处输入图像描述

  2. Taken http trigger and then initialized a variable of type array.取http触发器,然后初始化一个数组类型的变量。在此处输入图像描述

  3. Next listing Azure blobs in storage account.接下来列出存储帐户中的 Azure 个 blob。

在此处输入图像描述

  1. In foreach loop, iterating over list of blobs and then appending display name of blob to array variable.在 foreach 循环中,迭代 blob 列表,然后将 blob 的显示名称附加到数组变量。 Here using substring function to take first 5 characters of file name with expression,这里使用substring function 取文件名的前 5 个字符和表达式,

substring(items('For_each')?['DisplayName'],0,5) substring(items('For_each')?['DisplayName'],0,5)

在此处输入图像描述

  1. Creating blob with using content as array variable output.使用内容作为数组变量 output 创建 blob。

  2. File names in storage account displayed as shown below,存储帐户中的文件名显示如下所示,在此处输入图像描述

  3. Logic app ran successfully and blob created in storage account as shown below,逻辑应用成功运行并在存储帐户中创建了 blob,如下所示, 在此处输入图像描述

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 base64 编码字符串解析 Azure 逻辑应用程序中的 JSON 数组,以在 For_each 中使用 - Parsing JSON array in Azure Logic App from base64 encoded string to use in For_each 从逻辑应用中的响应中获取 cookie 数据 - Get cookie data from response in Logic App 从逻辑应用触发 Azure 操作组 - Trigger Azure Action Group from a Logic App 在 firebase 中查找项目,然后从第一个返回的项目中查找 docId,然后合并 - Lookup items in firebase then lookup docId from the first returned items then merge 是否有将 azure 逻辑应用程序从一个帐户迁移到另一个帐户的过程 - Is there a procedure for migrating azure logic app from one account to another account 如何从 Google pubsub 服务触发 azure 逻辑应用 - How to trigger azure logic app from Google pubsub service 使用 SendGrid 从逻辑应用向多个收件人发送电子邮件 - Sending emails with SendGrid from a logic app to multiple recipients Azure 逻辑应用程序:采用 API JSON 输入和 map 值到另一个键中 JSON Object - Azure Logic App: Take API JSON input and map values to keys within another JSON Object Azure 逻辑应用程序从单独收到的 xml 创建 JSON 数组 - Azure Logic Apps create JSON array from separate received xml 在 select 框反应中显示数组中的项目 - Display items from array in select box react
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM