c# - 替换 Azure 逻辑应用中的字符串

标签 c# azure azure-logic-apps

当我尝试替换 Azure 逻辑应用中的字符串值时 它抛出错误,您无法提供变量的自引用

"Set_variable": {
   "inputs": {
     "name": "Images",
     "value": "@replace(variables('Images'), 'cdn.gomasterkey.com/images/watermark.aspx?imageurl=/uf/', '~~')"
   },
   "runAfter": {
     "Append_to_array_variable": [
       "Succeeded"
     ]
   },
   "type": "SetVariable"
}

enter image description here

当我保存上面的代码时,我收到此错误,尽管我想从同一变量替换并再次放入其中,但它不允许我提供 self 引用。

最佳答案

您可以在逻辑应用中进行自引用,但是您可以使用 workflow functions获取值,然后将其替换为您想要的字符串。

我使用 actions('Initialize_variable').inputs.variables[0].value 来获取变量。

enter image description here

enter image description here

关于c# - 替换 Azure 逻辑应用中的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59190315/

相关文章:

c# - 如何在带有自定义 ContentTemplate 的 WPF 按钮上使用 accesskey?

swift - Realm - 在 Azure 上同步数据的最佳方式

azure - 两个应用程序的相同表、通知中心和服务器

c# - 将数百万个项目从一个存储帐户移动到另一个存储帐户

c# - 使用 .resx 文件在 LocalHost 上工作但不在服务器 MVC 上工作的本地化

c# - .NET Framework 3.5 的等效元组 (.NET 4)

azure - 在 Azure 中设置 Couchbase 服务器

azure - 如何在Azure中从BLOB读取文件内容并解析CSV文件?

Azure 逻辑应用程序可从 Azure Blob 容器动态获取 Blob 内容,而无需将文件名保存在路径中

azure - 通过 Azure 逻辑应用从 Azure 容器中上次修改的文件夹中获取 Blob 内容