替换 Azure 逻辑应用中的字符串
Replace string in 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"
}
当我保存上面的代码时,我得到了这个错误,它不允许我提供自我参考,尽管我想从同一个变量中替换并再次放入它。
您可以在逻辑应用程序中进行自引用,但是您可以使用 workflow functions 获取值,然后将其替换为您想要的字符串。
我使用actions('Initialize_variable').inputs.variables[0].value
获取变量。
当我尝试替换 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"
}
当我保存上面的代码时,我得到了这个错误,它不允许我提供自我参考,尽管我想从同一个变量中替换并再次放入它。
您可以在逻辑应用程序中进行自引用,但是您可以使用 workflow functions 获取值,然后将其替换为您想要的字符串。
我使用actions('Initialize_variable').inputs.variables[0].value
获取变量。