azure-logic-apps - 如何在 Azure 逻辑应用程序中将变量设置为“null”?
问题描述
我需要在某个 if 案例下将 null 发送到 CRM 端点。
由于我需要逻辑应用程序的多个部分的值,我想使用一个变量。
此代码仅将变量设置为“”,但不设置为空。在 IC_CODE 不是“05”的情况下,我需要 null。
"Set_variable_conditional_interchangability": {
"type": "SetVariable",
"inputs": {
"name": "conditional_interchangability",
"value": "@{if(equals(items('For_each')?['IC_CODE'], '05'), 928350000, null)}"
},
"runAfter": {
"Set_variable_direction": [
"Succeeded"
]
}
}
解决方案
因为您在值中使用了花括号{}
,所以运行时会将空值转换为空字符串。
尝试这个:
"Set_variable_conditional_interchangability": {
"type": "SetVariable",
"inputs": {
"name": "conditional_interchangability",
"value": "@if(equals(items('For_each')?['IC_CODE'], '05'), 928350000, null)"
},
"runAfter": {
"Set_variable_direction": [
"Succeeded"
]
}
}
高温高压
推荐阅读
- bash - Bash - 使用 group by 的时间字段总和
- python - Python - 类方法中的默认值和
self
- django - Django(如果用户已注销并且 user.is_authenticated = FALSE,如何防止用户直接访问 main_app/urls.py 中的 URL
- docker - 构建过程中的命令和shell中的命令之间的区别
- python - 在 Python 的 for 循环中使用多个变量
- java - 当我运行 spring 批处理作业时,chunkListener 不运行
- javascript - 反应如何调用一个道具
- github - 是否必须先在 github 上 fork 一个项目才能提出拉取请求?
- c# - Web服务上的调用按钮丢失
- c++ - C ++中“::delete”的目的是什么?