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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / build a flow to check ...
Power Automate
Unanswered

build a flow to check a range of dates from a sharepoint list date column and create new list item (Im stuck pictures inside)

(0) ShareShare
ReportReport
Posted on by

Hi,

 

Here is my flow 

for forum1.pngfor forum2.png

 

The expression configured inside single quotes:

addDays(utcNow(),1)
addDays(utcNow(),30)

 

the error im getting is

 

 

for forum3.png

 

The full error message is -(a little bit of identifying info)

{
 "status": 400,
 "message": "The expression \"DueDate\r ge '2019-10-15T10:19:02.3969724Z'\nDueDate\r le ''2019-11-13T10:19:02.3969724Z\" is not valid.\r\nclientRequestId: 48286b9f-2f2f-47dc-ae06-a7f75f770f81\r\nserviceRequestId: 48286b9f-2f2f-47dc-ae06-a7f75f770f81"
}

I just wish to build a flow that creates a new item in another list if the duedate is between the range of date. Any help would be appreciated

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: build a flow to check a range of dates from a sharepoint list date column and create new list item (Im stuck pictures inside)

    Try adding an 'And' between your two query settings. You can only submit one query filter on a Get items and you are trying to input two query strings.  

  • Community Power Platform Member Profile Picture
    on at
    Re: build a flow to check a range of dates from a sharepoint list date column and create new list item (Im stuck pictures inside)

    Can you,


    @Pstork1 wrote:

    Try adding an 'And' between your two query settings. You can only submit one query filter on a Get items and you are trying to input two query strings.  


    Can you break this down a little more?


    Try adding an 'And' between your two query settings.

     

    You mean the word 'And" or the , or ; & ? sorry if im sounding daft. Its probably something simple right in front of me that im just not seeing, ive been on this problem for the last 16hours.

  • Verified answer
    Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: build a flow to check a range of dates from a sharepoint list date column and create new list item (Im stuck pictures inside)

    I mean the word and in lowercase letters.  The filter you are looking to implement is that a date is greater than this date and less than this date.  You have to present the filter as a single query.  Also, in looking back at your screenshot, double check the location of the ' (single quotes) around your datetime formulas.  The second one seems to be misplaced.  Here's an example of one that works for me.

    screenshot.png

  • Community Power Platform Member Profile Picture
    on at
    Re: build a flow to check a range of dates from a sharepoint list date column and create new list item (Im stuck pictures inside)

    @Pstork1 wrote:

    I mean the word and in lowercase letters.  The filter you are looking to implement is that a date is greater than this date and less than this date.  You have to present the filter as a single query.  Also, in looking back at your screenshot, double check the location of the ' (single quotes) around your datetime formulas.  The second one seems to be misplaced.  Here's an example of one that works for me.

    screenshot.png


     

    DueDate
     ge '@{addDays(utcNow(),1)}' and
    DueDate
     le '@{addDays(utcNow(),30)}'

     

     

    gives me the exact same error

     

    {
     "status": 400,
     "message": "The expression \"DueDate\r ge '2019-10-15T13:19:22.2547901Z' and\nDueDate\r le '2019-11-13T13:19:22.2547901Z'\" is not valid.\r\nclientRequestId: 7a929901-73ab-4828-86c8-386296912f70\r\nserviceRequestId: 7a929901-73ab-4828-86c8-386296912f70"
    }

    The whole amount of my google searching and expiermenting the last two days is saying this should work.. im starting to think its a date code issue, curiously can run that test flow above and screenshot the sucess of the date columns? im in Aus and i take it you in US? id yours doesnt show the time stamp on the success? ge '2019-10-15T13:19:22.2547901Z'

     
  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: build a flow to check a range of dates from a sharepoint list date column and create new list item (Im stuck pictures inside)

    First thing I would try is to remove the carriage returns from your filter (the \r that shows in the error message.)  Also, make sure there is a space between the 'and' and the second DueDate AS you can see mine is all on one line (the \n that shows in the error message.)

     

    Here's what my query looks like in the successful run.

    TestDate le '2019-11-13T12:29:12.7872344Z' and TestDate ge '2019-07-31T12:29:12.7872344Z'

    Yours looks like this

    DueDate\r ge '2019-10-15T13:19:22.2547901Z' and\nDueDate\r le '2019-11-13T13:19:22.2547901Z'

    As you can see it automatically formats for UTC, rather than the US region.  So I don't think its a data time formatting issue.  I'm assuming that DueDate is a SharePoint datetime column right?

     

    Other than that I don't see any differences.

  • v-alzhan-msft Profile Picture
    on at
    Re: build a flow to check a range of dates from a sharepoint list date column and create new list item (Im stuck pictures inside)

    Hi @Anonymous ,

     

    Could you please share a full screenshot of the configuration of your current flow?

    Have you take a try with @Pstork1 's solution?

    What is the full expession in the Filter Query field in the Get items action?

    Please don't add extra text or space in the Filter Query field in the Get items action, also please take a try with @Pstork1 's solution and let me know if your problem could be solved.

    1.png

     

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard