cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
john3j
Helper I
Helper I

Power Automate Flow - Dataverse for Teams - Filter Rows

Hello,

 

I created an app within a Team in MSTEAMS and added dataverse tables.  I am trying to figure out how to make the flow only return items that have an End Date within the current week, but cannot figure it out.

 

john3j_0-1660234877558.png

 

If anyone could help me it would be greatly appreciated!

 

Respectfully,

John Strange

1 ACCEPTED SOLUTION

Accepted Solutions
v-peijunz-msft
Microsoft
Microsoft

Hi @john3j,

 

Based on your description, I have made a simple test for your reference.

1. Here is my Dataverse table called Highlights:

vpeijunzmsft_0-1660718559992.png

2. Here is my flow:

formatDateTime(addDays(utcNow(),sub(1, dayOfWeek(utcNow()))),'yyyy-MM-dd')
formatDateTime(addDays(outputs('Compose'),7),'yyyy-MM-dd')
@and(greaterOrEquals(formatDateTime(convertTimeZone(item()?['crba2_enddate'], 'Pacific Standard Time', 'UTC'), 'yyyy-MM-dd'),outputs('Compose')), less(formatDateTime(convertTimeZone(item()?['crba2_enddate'], 'Pacific Standard Time', 'UTC'), 'yyyy-MM-dd'), outputs('Compose_2')))
item()?['crba2_title']
formatDateTime(convertTimeZone(item()?['crba2_startdate'], 'Pacific Standard Time', 'UTC'),'yyyy-MM-dd')
formatDateTime(convertTimeZone(item()?['crba2_enddate'], 'Pacific Standard Time', 'UTC'),'yyyy-MM-dd')

vpeijunzmsft_1-1660718559997.pngvpeijunzmsft_2-1660718559999.png

vpeijunzmsft_3-1660718560002.png

vpeijunzmsft_4-1660718560006.png

3. Result Screenshot:

vpeijunzmsft_5-1660718560009.png

vpeijunzmsft_6-1660718560011.png

 

Here are references of Dataverse tables time zone:

https://docs.microsoft.com/en-us/power-apps/developer/data-platform/behavior-format-date-time-attrib...

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=window...
https://www.fidelityfactory.com/blog/2021/4/1/troubleshooting-dataverse-model-driven-app-date-time-i...

 

Best regards,

Sylvia

View solution in original post

1 REPLY 1
v-peijunz-msft
Microsoft
Microsoft

Hi @john3j,

 

Based on your description, I have made a simple test for your reference.

1. Here is my Dataverse table called Highlights:

vpeijunzmsft_0-1660718559992.png

2. Here is my flow:

formatDateTime(addDays(utcNow(),sub(1, dayOfWeek(utcNow()))),'yyyy-MM-dd')
formatDateTime(addDays(outputs('Compose'),7),'yyyy-MM-dd')
@and(greaterOrEquals(formatDateTime(convertTimeZone(item()?['crba2_enddate'], 'Pacific Standard Time', 'UTC'), 'yyyy-MM-dd'),outputs('Compose')), less(formatDateTime(convertTimeZone(item()?['crba2_enddate'], 'Pacific Standard Time', 'UTC'), 'yyyy-MM-dd'), outputs('Compose_2')))
item()?['crba2_title']
formatDateTime(convertTimeZone(item()?['crba2_startdate'], 'Pacific Standard Time', 'UTC'),'yyyy-MM-dd')
formatDateTime(convertTimeZone(item()?['crba2_enddate'], 'Pacific Standard Time', 'UTC'),'yyyy-MM-dd')

vpeijunzmsft_1-1660718559997.pngvpeijunzmsft_2-1660718559999.png

vpeijunzmsft_3-1660718560002.png

vpeijunzmsft_4-1660718560006.png

3. Result Screenshot:

vpeijunzmsft_5-1660718560009.png

vpeijunzmsft_6-1660718560011.png

 

Here are references of Dataverse tables time zone:

https://docs.microsoft.com/en-us/power-apps/developer/data-platform/behavior-format-date-time-attrib...

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=window...
https://www.fidelityfactory.com/blog/2021/4/1/troubleshooting-dataverse-model-driven-app-date-time-i...

 

Best regards,

Sylvia

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,248)