否则如果在 Dataweave 2.0 中

Else if in Dataweave 2.0

我试图在我的数据编织中编写 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}"),

表达式缺少最后一个 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 访问。