question

ewinkiser avatar image
0 Votes"
ewinkiser asked ewinkiser commented

Please help...still fixing QA Bugs....question regarding using an and logical expression

Hello!
@nasreen-akter @MartinJaffer-MSFT @HimanshuSinha-MSFT

I am trying to use the following in an If Condition:

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

What I want to say is that if the phoneIsPrimary flag is true AND the phone type is 'home' do the following..........

I have worked on this for hours and can't see to get it right.

I am getting the following warning:
77470-image.png

Thanks!!
Mike Kiser


azure-data-factory
image.png (25.1 KiB)
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.

ma01 avatar image
0 Votes"
ma01 answered ewinkiser commented

Change the expression as below. This should work

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

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

@ma01 , perfect!! That worked....thanks!! Mike Kiser

0 Votes 0 ·

@ma01 , I get confused on when to use the @. What is the general rule like in your solution above?
Thanks!
Mike Kiser

0 Votes 0 ·
ma01 avatar image
0 Votes"
ma01 answered ewinkiser commented

@ewinkiser Glad to hear it worked. Basically @ acts as an expression evaluator and goes the same way if its incorporated within strings as well. So, in most of the cases single @ at beginning typically evaluates correctly.

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

Thanks @ma01, I understand now. Appreciate the explanation!
Mike

0 Votes 0 ·