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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using manual trigger d...
Power Automate
Unanswered

Using manual trigger dates in condition

(0) ShareShare
ReportReport
Posted on by 68

Hi

I am very new to flow and I'm trying to create a flow that requests for a [Start Date] and [End Date] when triggered.

Then I wish to use those dates in conditions so that I can populate a database with the document properties (from Sharepoint) where the document date is between the two dates.

 

I have been trying to use the following condition, but it isn't identifying any documents that fulfil the criteria even though I know there are some that do. 

 

@and(@greateror equals(items('Apply_to_each')?['Document_x0020_Date'], triggerbody()?['Start Date'], ''), @lessorequals(items('Apply_to_each')?['Document_x0020_Date'], triggerbody()?[End Date'], ''))

 

Any help with this would be very much apprecaited. 

 

TIA

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @Back2Basics,

     

    What’s the trigger in your flow? How do you input Start date and End date when triggered?

    To test this issue, I created a flow with the Button trigger, input Start date and End date using two text fields.

    Then get file properties from a document library.

    In the condition, input the following code:

    @and(greaterorequals(items('Apply_to_each')?['Date'], triggerBody()['text']),lessorequals(items('Apply_to_each')?['Date'], triggerBody()['text_1']))

    Note: triggerBody()['text'] is the Start date, triggerBody()['text_1'] is the End date.

    The code works fine and documents within the two dates will be filtered out.

    1.PNG

    Please take it for a reference and try again on your side.

     

    Best regards,

    Mabel Mao

  • Back2Basics Profile Picture
    68 on at

    Thanks Mabel Mao.

     

    Yes, I have set up a button trigger  to get a user to input the start and end dates as you have done.

     

    Thank you for the condtition code. I have used this and updated 'Date' to 'Document Date' as well as 'text' and 'text_1'. It works in terms of it being a workable condition, but I still get no returns, despite knowing that there are documents that fit this criteria. I thought it might be the date format that I'm using, but i've tried various formats and it's not working - do you know what format I should use for the 'start date' and 'end date' texts? 

     

    I have tried: dd/mm/yyyy, mm/dd/yyyy, yyyy-mm-dd

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard