Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Comparing dates in a GetItems container to filter the returned list

(0) ShareShare
ReportReport
Posted on by

 

Hi team,

After banging my head to desk for a few hours I'm now seeking expert help. I am creating a flow to run daily to email job vacancies that expire on the current day. Having worked with databases for years I know the got ya on dates and datetimes. So my list has two fields at the moment, Title and TriggerValue. TriggerValue is a date only field. I have my recurrance container, then a getitmes (as there could be 0 or more in the list that I need to get) container. In the GetItems I have the site and the list name. I then want to add a filter to say only when triggervalue = today.

This is what I have tried (plus a variety of other formats)

formatDateTime(item()?['triggervalue'], 'dd-mm-yyyy') eq formatDateTime(utcnow(),'dd-mm-yyyy')

and @equals(@formatDateTime(item()?['triggervalue'], 'dd-mm-yyyy'), @formatDateTime(utcnow(),'dd-mm-yyyy'))

and @formatDateTime(item()?['triggervalue'], 'dd-mm-yyyy') eq @formatDateTime(utcnow(),'dd-mm-yyyy')

 

Please help me get a date filter into the GetItems and then I can finish testing the flow to see that the email is sent as expected

  • Community Power Platform Member Profile Picture
    on at
    Re: Comparing dates in a GetItems container to filter the returned list

    Thanks v-micsh-msft. It does appear that I can't pass in the field value to the OData query which is frustrating as it now looks like I need to pull the whole list and then filter in the loop to only select the items where the date = today.

  • v-micsh-msft Profile Picture
    on at
    Re: Comparing dates in a GetItems container to filter the returned list

    Hi @Anonymous,

     

    You need to change the format to 'dd-MM-yyyy', for 'mm', it stands for the minutes.

    If here you would like to fitler the Get items table with workflow definition language, then we could take use of the filter array action, then copy and paste the following formula into the condition advanced mode:

    @equals(formatDateTime(item()?['triggervalue'], 'dd-MM-yyyy'), 
     formatDateTime(utcnow(),'dd-MM-yyyy'))

    If you would like to work with the Filter Query option within the Get items action, then the format should be:

    Column eq value

     

    There is no function available that could format the date string from sharepoint into a whole time string, so for your situation, please consider switch to the format below:

    DateTime ge '2017/6/10'

     

    My testing results shows that it seems currently the SharePoint Get items aciton don't support the dynamic value.

     

    Regards,

    Michael

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow