Hi @Tarun Sharma ,
Welcome to Microsoft Q&A forum and thanks for reaching out here.
Why If activity expression is resulting in False?
The reason always the IF condition enters false path is because as per your dynamic expression (@contains(activity('Get Metadata1').output.childItems,'SalesLT.Customer.txt' )
) , you are passing @activity('Get Metadata1').output.childItems
which is an array type to @contains
function. But @contains()
function expects a string as input argument and then looks for provided substring exits or not. This is the reason why it always enters false path.
Resolution: In order to convert the array type to string you can use @String()
function and it should help convert your childItems
from array to a string type.
To do so please use below dynamic expression and it should help resolve your issue.
@contains(string(activity('Get Metadata1').output.childItems),'SalesLT.Customer.txt' )
Hope this helps.
Please don’t forget to Accept Answer
and Yes
for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.
@Tarun Sharma Just checking in to see if the below information was helpful. If it answers your query, please do click
Accept Answer
andYes
for "was this answer helpful", as it might be beneficial to other community members reading this thread. If you have any further query, do let us know.Thank you
@Tarun Sharma We still have not heard back from you. Just wanted to check if the below information was helpful? If it answers your query, please do click
Accept Answer
andYes
for "was this answer helpful", as it might be beneficial to other community members reading this thread. And, if you have any further query do let us know.Thank you