cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AYCHL
Frequent Visitor

OData Filter SQL from Another SQL Query

Hi guys,

I'm able to get the records that I want to see if the Serial Exist in another database table.

I query the Table1 to get the records that are not Removed (Removed eq false).

But I want to compare the Table 1 filtered array with the Table2.AssetSerial.

Then Create an array with the Serials found that are in both Arrays and update the Table1 records.

 

e.i

 

Table1 Filtered

ID   AssetSerial   Removed

1    Serial-1         0

2    Serial-2         0 

3    Serial-3         0

4    Serial-4         0

Table2 Filtered based on Table 1 array

ID       AssetSerial   EntryDate

550    Serial-2         2020-01-09

621    Serial-3         2020-01-09

 

then update Table1's ID: 2 & 3 to Removed = true

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @AYCHL ,

 

You could refer to the following methods to configure Flow.

  • First, initialize the array variable is used to store all AssetSerial in Table2.
  • Use the Get rows action to get the records in Table1 and iterate through all the records.
  • Determines whether the array variable contains the AssetSerial contained in the current record. If it does not, the record is updated.

Image reference:

14.PNG15.PNG

Hope this helps.

 

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
Brad_Groux
Community Champion
Community Champion

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-bacao-msft
Community Support
Community Support

 

Hi @AYCHL ,

 

You could refer to the following methods to configure Flow.

  • First, initialize the array variable is used to store all AssetSerial in Table2.
  • Use the Get rows action to get the records in Table1 and iterate through all the records.
  • Determines whether the array variable contains the AssetSerial contained in the current record. If it does not, the record is updated.

Image reference:

14.PNG15.PNG

Hope this helps.

 

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

Thank you @v-bacao-msft  for the Help!

While this was great help, I was able to do it differently!

1.JPG2.JPG3.JPG

 

I Still think there is a more efficient way to do this, I will try your Method and see how it works!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,513)