【问题标题】:Else if in Dataweave 2.0否则,如果在 Dataweave 2.0 中
【发布时间】:2021-06-02 16:57:56
【问题描述】:

我正在尝试在我的 Data weave 中编写 else if 语句,但收到错误 expression missing ""

PBSI__Tax_Code__c                   : if((payload.order.customer."billing-address"."country-code" =="NL") "${sf_taxcode}" else if(payload.order.customer."billing-address"."country-code" =="DE") "${sf_deTaxcode}"),

【问题讨论】:

    标签: dataweave mulesoft mule4


    【解决方案1】:

    表达式缺少最后一个 if 句子的 elseIt is mandatory 有一个else

    作为一个简化的例子:

    {
        PBSI__Tax_Code__c: 
            if(country_code =="NL") "something" else if(country_code =="DE") "something" else "something else"
    }
    

    另请注意,它在 DataWeave 配置属性中是通过 p() function 访问的。

    【讨论】:

      猜你喜欢
      • 2020-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多