ADF IF Activity Expression Question?

Mike Kiser 1,536 Reputation points
2021-06-17T01:37:29.61+00:00

@Nasreen Akter @MartinJaffer-MSFT @KranthiPakala-MSFT

For an IF Activity I have @equals(item().isFullTime,true) for the Expression. It doesn't seem to be working.

Do I need to use @equals(item().isFullTime, 'true') (with single apostrophe)? In the JSON we have

isFullTime":false or isFullTime":true

Thanks!
Mike

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

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2021-06-17T11:12:44.41+00:00

    Hi @Mike Kiser

    Thank you for posting your query.

    If your json return values in Boolean that means as true or false then it will work in equals function.

    In below example, My Lookup activity getting "isFullTime" property value in Boolean and I am using that property in IF activity with equals() function to compare with true. Its working fine for me. Kindly check below steps of implementation

    Step1: Lookup activity getting data from SQL table
    106550-lookupactivity.gif
    Step2: Passing Value array from lookup activity to ForEach activity
    106631-foreachactivity.gif
    Step3: If Activity Inside ForEach Loop
    106517-ifactivity.gif
    Step4: If we observe execution. My pipeline is executing Activity which is inside True of IF condition. Hence, its shows that if your property value has Booleans such as true or false then you can use directly below expression to compare.
    @equals(item().isFullTime,true)
    106580-pipelineexecution.gif

    Hope this will help. Please let us know if any further queries. Thank you

    ------------

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a email-notifications
    1 person found this answer helpful.

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.