Skip to main content

Notifications

Power Automate - Building Flows
Answered

Filter_array contains invalid expression

(0) ShareShare
ReportReport
Posted on by 2
Hi all,
Ive the following message when i try to save
The
input parameter(s) of operation 'Filter_array' contains invalid
expression(s). Fix invalid expression(s) for the input parameter(s) of
operation 'Filter_array'.
 
 
what's wrong with that expression ?
@and(
@and(
@greaterOrEquals(formatDateTime(items('Apply_to_each')?['start']?['dateTime'], 'HH:mm'), '09:30'),
@lessOrEquals(formatDateTime(items('Apply_to_each')?['start']?['dateTime'], 'HH:mm'), '19:00')
),
@or(
@equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 1), // Lundi
@equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 2), // Mardi
@equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 3), // Mercredi
@equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 4), // Jeudi
@equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 5) // Vendredi
)
)
 
Many thanks!
  • Verified answer
    David_MA Profile Picture
    David_MA 8,929 on at
    error invalid cod
    You don't show your flow, so I don't know where you are trying to use your expression, but I see a number of issues. You would not use @ in an expression in Power Automate unless it is a trigger condition, and even then, the @ would be at the start of the expression.
     
    As far as I know, comments are not allowed in Power Automate expressions, so all of those are invalid. I have cleaned it up as much as I can, but I have not tested this and am not sure it will work. This will give you a better idea of what it needs to look like to work:
     
    and(greaterOrEquals(formatDateTime(items('Apply_to_each')?['start']?['dateTime'], 'HH:mm'), '09:30'), lessOrEquals(formatDateTime(items('Apply_to_each')?['start']?['dateTime'], 'HH:mm'), '19:00'), or(equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 1), equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 2), equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 3), equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 4), equals(dayOfWeek(items('Apply_to_each')?['start']?['dateTime']), 5)))
     
    Maybe someone else will see how I have formatted it and can offer additional advice if it does not work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard