ADF Complex Expression Help please......very critical for go live...

Mike Kiser 1,536 Reputation points
2021-08-25T17:36:32.507+00:00

Hi @Nasreen Akter @KranthiPakala-MSFT @MartinJaffer-MSFT @Nandan Hegde

I need to ADD to this expression AND if item().status is not "Termination"
can I just put a comma at the end and say not(contains(item().status, 'Termination'))) but I couldn't get the syntax to work. Going out of my mind on this one :-)

@or(or(contains(createArray('BCO','BED','BSC','BNB'),item().company), equals(item().classcode,'EMP')), not(contains(item().status,'Inactive')))

Thanks so much!
Mike Kiser

Here is what I tried

@or(or(contains(createArray('BCO','BED','BSC','BNB'),item().company), equals(item().classcode,'EMP')), not(contains(item().status,'Inactive')), not(contains(item().status, 'Terminated')))

but get this error:
Invalid
function 'or' does not accept 3 argument(s)

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,118 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nandan Hegde 33,241 Reputation points MVP
    2021-08-25T18:03:38.223+00:00

    Hey,
    You need to add another OR condition .
    In ADF , logical AND and OR are dual operators meaning they accept only 2 parameters. For multiple conditions ,you need to have nested operators.

    @or(or(or(contains(createArray('BCO','BED','BSC','BNB'),item().company), equals(item().classcode,'EMP')), not(contains(item().status,'Inactive'))), not(contains(item().status, 'Terminated')))

    Note : I might be missing some parenthesis which I can correct once I am at my system by tomm


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.