cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Responsive Resident
Responsive Resident

Filter Flow for only dates after max date

I have two tables, where I would like to append data to the second table. My trouble is with "Filter Array"

Table 1

housed in Common Data Service

Important column: Created Date

 

Table 2

housed in SQL Server

Important column: Created Date

 

Im trying to create a flow that:

Sends data from Table 1 to Table 2

The data it sends should be greater then the maximum created date in table 2 for the column

So basically Id like to create a filter that does the following:

Table1.CreatedDate> max(Table2.CreatedDate)

 

Everything else is working, Im just having trouble creating this filter

 

Here is what I have tried that isn't working:

 

Image 7.png

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @TesDA ,

 

You could try this configuration:

38.PNG39.PNG40.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-bacao-msft
Community Support
Community Support

 

Hi @TesDA ,

 

You could use Get rows to get the row with the largest Date.

 

Set Order by to sort in descending order according to the date field, and then set the Top count to 1, so that you can get the largest date.

 

Then store the date in a variable.

 

Then get the data in the CDS, traverse table1, and see if Table1.CreatedDate is larger than the largest Date obtained before.

 

If so, store this record in the Sql table.

 

Hope it makes sense.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TesDA
Responsive Resident
Responsive Resident

What Ive done is similar. I just did the max(Created Date) in sql server. I then initialized a variable in flow for this table but it didn't work. Is it possible you could show me what you do when you initialize the variable in flow? I must be doing this wrong.

 

I added a visual to the original post to show what Ive done that isn't working

 

Hi @TesDA ,

 

You could try this configuration:

38.PNG39.PNG40.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,627)