-1

I am trying to check multiple fields on the Choiceset using the Logical AND OR but it is throwing error.Below is the expression I tried

not isEmpty(vars.quoteLineItemId) AND (not isEmpty(payload.PhaseLevelItemNumber) OR not isEmpty(payload.PhaseLevelItemName)

And the error is like Unexpected end of input, expected ')' for the enclosed expression. (line 1, column 124):

I even tried below expression but no luck

 vars.quoteLineItemId!=empty AND (payload.PhaseLevelItemNumber!=empty OR payload.PhaseLevelItemName!=empty)

Any help is greatly appreciated

trx
  • 2,077
  • 9
  • 48
  • 97

1 Answers1

1

Please make sure to provide sample input and expected output when you ask a question.

Payload

{
    "PhaseLevelItemNumber": "Hello world!",
    "PhaseLevelItemName": " Hello Mars"
}

Script

%dw 2.0
output application/json
var quoteLineItemId = "asdasdad"
---
not (isEmpty(quoteLineItemId) and ((not isEmpty(payload.PhaseLevelItemNumber) or not isEmpty(payload.PhaseLevelItemName))))
Salim Khan
  • 4,233
  • 11
  • 15