web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

get items conditioned

(1) ShareShare
ReportReport
Posted on by 2
Hi
 
I'm pretty new when it comes to building flows so this probably has an easy solution...
 
I want the flow that I'm building to fetch rows from a sharepoint list that meet two conditions. The first condition is working - the get items filter query is set to Status eq '5. Pågående projekt'
 
i also want it to only get the items where the modified column has a date that is less than the date of when the flow runs, minus 30. so i have put a compose action before the get items action to get the date, and added a function to the filter query so that the full line reads:
 
Status eq '5. Pågående projekt' and Modified lt '@{outputs('Compose')}'
 
but i the flow fails:
 
The expression "Status eq '5. Pågående projekt' and Modified lt 'formatDateTime(addDays(utcNow(), -30), 'yyyy-MM-ddTHH:mm:ssZ')'" is not valid. Creating query failed.
 
any ideas?
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at
    The error indicates you are trying to put the entire filter query into an expression. It would help to see a screenshot of your flow. Anyway, your Filter Query field should look like this.
     
     

    Return Count

    Whenever I use a Filter Query in a Get Items action, I always like to return the count of items returned in a Compose action. This is helpful when building a flow and can also be used to troubleshoot your flow.


    Insert a Compose action. Add an Expression. Use the length() function.

    Select the Dynamic content tab and insert the value dynamic content from the Get Items action into the length() function.
     

    Run a test.

    ----

    You might find these YT tutorials helpful: 

    Send Emails Based on a 📆 Date Column in SharePoint with Microsoft Power Automate

    In this Microsoft Power Automate tutorial, I’ll show you how to build a flow that will send a Happy Birthday email to a user based on a date column in a SharePoint list. The SharePoint list also contains a column with a Manager’s name which we’ll use to send a three-day and day of reminder to the user’s manager.

    This automation will use the Filter Array action to filter out all SharePoint list items where the user’s birthday is today or in three days. This flow can apply to a variety of scenarios such as:

    📅 Student Birthdays

    📅 Project Due Dates

    📅 Contract/Membership Renewals

    📅 License Expirations

    📅 Client Anniversaries


    IN THIS VIDEO:

    ✅ How to Send an Email based on a Date Column in SharePoint

    ✅ Using the Recurrence Trigger in Power Automate

    ✅How to Use the Filter Array Action with multiple conditions

    ✅ How to Get Dynamic Content from a Filter Array Action

    ✅How to Get a Date Three Days from Today

    ✅ How to Create a Dynamic Date Based on utcNow()

    ✅ How to Return a Count of Items

    ✅ How to initialize and set a variable

    ✅ How to use the Send an Email (V2) action

    ✅ How to send test emails


    ------

    How to Work with 📆 Dates in Power Automate | Example Scenarios and Tips & Tricks

    Are you easily stumped when working with Dates in Power Automate? In this Power Automate tutorial, I’ll show you how to compose an expression that will return a future date, a past date, how to count the number of days between two dates, how to check for a birthdate and anniversary date as well as tips and tricks when working with dates in Power Automate.

    I’ll cover some common use cases and concepts that can help you to build better Power Automate flows. Feel free to skip ahead using the timestamps listed below. I’ve also linked a few other tutorials that you might be interested in as well.

    IN THIS VIDEO:

    ✅ 4 Date Functions You Need to Know

    ✅ How to use the Convert Time Zone Action

    ✅ How to Get a Future Date

    ✅ How to Get a Past Date

    ✅ How to Return SharePoint Items Due in a Number of Days

    ✅ How to Return SharePoint Items Due within a Date Range

    ✅ How to write a Filter Query for SharePoint Items Due in 30, 60 and 90 Days

    ✅ How to Calculate the Number of Days between Two Dates

    ✅ How to Check for a Birthdate and Anniversary Date

    ✅ How to work with Dates and Times in Excel

    ✅ How to use a Manual Trigger with Date Input

    ✅ How to Output Dynamic Text with an Expression

    ✅ How to Check if a Date Falls on a Weekend

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard