cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SBAYXX
New Member

Filter Query - Get events

Hi

I cannot get my head around how I should build the filter for a Get  events action. I would like the Get events, to only return events which occurs on the same day as the event in the trigger (When event is modified), but 'date eq StartTime' does not work, and I'm not sure how to use the expressions and filter then. 

Flow_filter.png

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @SBAYXX,

 

You could use the Start property. However, it seems like you have to use a specific syntax for that field, Start/DateTime. Found that syntax in this thread.

 

In your example you could try and use this expression:

In this expression I am using the start field of the changed event and extract the day. With the filter I make sure that I only retrieve events which start on the same day after 00:00 or before 23:59.

 

Start/DateTime ge '@{formatdateTime(triggerOutputs()?['body/start'], 'yyyy-MM-ddT00:00:00.0000000')}' AND Start/DateTime le '@{formatdateTime(triggerOutputs()?['body/start'], 'yyyy-MM-ddT23:59:00.0000000')}'

 

startdatetime_getevents.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @SBAYXX,

 

You could use the Start property. However, it seems like you have to use a specific syntax for that field, Start/DateTime. Found that syntax in this thread.

 

In your example you could try and use this expression:

In this expression I am using the start field of the changed event and extract the day. With the filter I make sure that I only retrieve events which start on the same day after 00:00 or before 23:59.

 

Start/DateTime ge '@{formatdateTime(triggerOutputs()?['body/start'], 'yyyy-MM-ddT00:00:00.0000000')}' AND Start/DateTime le '@{formatdateTime(triggerOutputs()?['body/start'], 'yyyy-MM-ddT23:59:00.0000000')}'

 

startdatetime_getevents.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


SBAYXX
New Member

Perfect - thank you, works like a charm!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,453)