Thanks for posting your question in the Microsoft Q&A forum.
You need to use the and
function along with two separate contains
functions. Here's how you can modify your expression:
@and(
contains(string(item().name), pipeline().parameters.locations),
contains(string(item().name), formatDateTime(adddays(utcNow(),0),'yyyyMMdd'))
)
This expression checks if the item().name
contains both the pipeline().parameters.locations
and the formatted date string. The and
function ensures that both conditions are true for the overall expression to evaluate to true
If you need to use this in an If Condition activity, you can wrap it in an @if
function:
@if(
and(
contains(string(item().name), pipeline().parameters.locations),
contains(string(item().name), formatDateTime(adddays(utcNow(),0),'yyyyMMdd'))
),
'true_result',
'false_result'
)
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful