question

ewinkiser avatar image
0 Votes"
ewinkiser asked nasreen-akter commented

Another ADF Expression with @And "Not Working",,,please help

Hi @nasreen-akter @MartinJaffer-MSFT

I have an expression in my IF Activity

@and(equals(item().phoneIsPrimary,true),equals(item().phoneType, 'home'))

However, my data looks like the following and it should drop into this IfElse

{"isPrimary":true,"type":"Home","phoneNumber":"787/215-1312"}]

and it never drops into this IfElse Activity...so my above expression must be incorrect. PLEASE HELP...this is a QA Testing issue...thanks!
Mike

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

nasreen-akter avatar image
1 Vote"
nasreen-akter answered nasreen-akter commented

Hi @ewinkiser,

Would you please try the toUpper() function, e.g.,

 @and(equals(item().phoneIsPrimary,true),equals(toUpper(item().phoneType), 'HOME'))

Thanks!

· 3
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.

Hi @nasreen-akter ,

No , that didn't work, it fell into the false where I have a Wait. the field phoneType is always like "Home" and a NVARCHAR in the DB Table....not sure why it is not dropping into the True in the IfElse.....
Thanks
MIke


91832-image.png


0 Votes 0 ·
image.png (23.2 KiB)

@nasreen-akter

Wow, my fault I wasn't clear....True is in the DB Table as True...as soon as I added that to

@and(equals(item().phoneIsPrimary,'True'),equals(toUpper(item().phoneType), 'HOME'))

It dropped into the IfElse true logic for the first time yet...I am so relieved! :-)

Thanks!!
Mike


1 Vote 1 ·

@ewinkiser, glad that it resolved! :)

1 Vote 1 ·