Azure Logic App中的odata查询给出空值 [英] odata query in Azure Logic App giving null value

查看:117
本文介绍了Azure Logic App中的odata查询给出空值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在尝试使用Logic Apps中的Parse JSON从CRM实体访问整数值.它返回一个空值而不是一个整数值.

I am trying to access an integer value from CRM Entity using Parse JSON in Logic Apps. It is returning a null value instead of an integer value.

" territoryinteger":"@ {items('For_each')?['_ vcm_territoryid_value@OData.Community.Display.V1.FormattedValue']}'",

"territoryinteger": "@{items('For_each')?['_vcm_territoryid_value@OData.Community.Display.V1.FormattedValue']}",

任何帮助表示赞赏.

Any help is appreciated.

谢谢

推荐答案

您好,

值为null表示该字段在当前运行中没有任何值.如果该字段具有值(您希望是整数),则上述查询将返回整数值,而不是null.

A value of null means the field did not have any value for the current run. If the field has a value (which you expect to be an integer) then the above query will return the integer value instead of null.

您可以使用 coalesce  为此  

you can use  coalesce for this purpose where sometimes the value of the field can be null. 

修改后的查询看起来像这个: "territoryinteger": " @ coalesce( {items('For_each')?['_ vcm_territoryid_value @ OData.Community.Display.V1.FormattedValue'],'0'}'"

You modified query will look like this one:"territoryinteger": "@coalesce({items('For_each')?['_vcm_territoryid_value@OData.Community.Display.V1.FormattedValue'],'0'}"

在这里,我假设0是该字段没有任何值时要使用的默认值.

Here, I assumed 0 is the default value to use when the field doesn't have any value.

谢谢你

穆罕默德·易卜拉欣


这篇关于Azure Logic App中的odata查询给出空值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆