question

ewinkiser avatar image
0 Votes"
ewinkiser asked ewinkiser commented

ADF Filter Activity Error with Expression....

Hi! @nasreen-akter @MartinJaffer-MSFT

I need to use a FILTER ACTIVITY with the following expression. I'm wanting to say if the first part in the parens are true and the item().classcode = 'EMP" is true.....

and(@contains(createArray('BCO','BED','BSC','BNB'),item().company), equals(item().classcode,'EMP'))

for the filter

But getting this error:
Warning
Expression of type: 'String' does not match the field: 'condition'

Please suggest...thanks! Mike Kiser


azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered ewinkiser commented

Hi again @ewinkiser .

Simple typo mistake. Move the @ in front of the and.

@and(contains(createArray('BCO','BED','BSC','BNB'),item().company), equals(item().classcode,'EMP'))

because you had the @ between "and" and "contains", the whole thing started to look like a string. "andtrue" or "andfalse". The evaluation started after "and".

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MartinJaffer-MSFT

That worked perfectly; I am on my 13th hour of working today; I am surprised I can even see lol. I also greatly appreciate the explanation which helps me understand expressions.....

I really appreciate your answer tonight, Martin!

Mike Kiser

0 Votes 0 ·