如何将logicapps中的文件名从base64转换为字符串,然后过滤它们

发布于 01-23 19:25 字数 198 浏览 3 评论 0原文

如何在逻辑应用中从HTTP中过滤文件?

我的方法是构成这样的函数

toLower(base64ToString(triggerOutputs()['headers']['x-ms-file-name-encoded']))

,但它无法正常工作……我在Logicapp中是全新的,但需要它才能完成一个项目。

How can I filter files from HTTP get request in Logic Apps?

My approach is to compose a function something like this

toLower(base64ToString(triggerOutputs()['headers']['x-ms-file-name-encoded']))

but it's not working... I'm completely new one in LogicApps but need it for one project requirement.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ゝ杯具 2025-01-30 19:25:32

base64ToString(triggerOutputs()['headers'] ['x-ms-file-name-name-Name-name编码'])帮助您提取文件的名称。在过滤您选择的文件时,您可以使用条件连接器,然后将过滤后的文件保存到存储中。例如,这是我的逻辑应用程序。

成功运行后,我能够将文件保存到我的一个blob容器中。

如果您试图用其文件名过滤文件,则在两侧使用小写以进行比较以对其进行过滤。

我将以下表达式放在右

toLower(base64ToString(triggerOutputs()['headers']['x-ms-file-name-encoded']))

中的左侧

toLower('<YOUR_FILE_NAME>')


我正在使用包含来过滤条件连接器中的表达式,以便每个包含名称或名称的一部分的文件都添加到我的存储帐户中。另外,我只是使用示例内容存储在我的斑点中(即斑点内容),但是您可以使用所需的内容。

更新答案

“

这有助于从SharePoint文件夹过滤CSV文件,并将被过滤到目标文件夹的文件移动。

注意:确保您是否试图将文件名作为过滤器使用,就像我已经提到的那样,您可以将文件名的案例更改为下部或上部,因为这是有时很少的部分所需的文件夹不会触发。

The base64ToString(triggerOutputs()['headers']['x-ms-file-name-encoded']) helps you to extract the names of the files. While filtering the file of your choice then you can use Condition connector and save the filtered file to your storage. For example here is my logic app.

enter image description here

After successful run I could able to save the file into one of my blob containers.

enter image description here

If you are trying to filter the files with its file name then use lowercase on both sides for comparison to get it filtered.

enter image description here

I have placed the below expression in the left

toLower(base64ToString(triggerOutputs()['headers']['x-ms-file-name-encoded']))

In the right

toLower('<YOUR_FILE_NAME>')

Note:
I'm using contains to filter the expression in condition connector so that every file which contains the name or part of the name gets added to my storage account. Also, I'm just using sample content to store in my blob (i.e., blob content) but you can use the one which you require.

Updated Answer

enter image description here

This helps to filter CSV files from the sharepoint folder and moves the files which got filtered to the destination folder.

Note: Make sure if you are trying to use file name as filter, like I have already mentioned you can change case of file name into either Lower or upper as this is the main part where sometimes few of the desired folders won't trigger.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文