cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dsab81
Microsoft
Microsoft

Using SQL Query Results from the SQL Action used inside a Apply to each

Hi,

I have situation where i have to run a sql query within a 'apply to each' to get some results from the variables within in the 'apply to each' , and pass it down stream to other new action with in the same 'apply to each'

 

But when i do it ,  the SQL objects results are not being shown on the right, when i wanted to use the 'Result Sets' into the compose action ( the last compose action at the end ). 

 

dsab81_0-1622837916296.png

 

The lock here is that the SQL query needs paremetres from the variables within Apply to each , so i cannot move it outside Apply to each.

 

Please suggest an alternative approach? 

 

Can i Setup another flow to run SQL Query  within the apply to each ?

and

whether it would allow me to pass the variable values from this flow to the child flow ?

 

 

 

3 REPLIES 3
PrasadAthalye
Super User
Super User

Resultsets should be available in compose. Are you not able to see it in dynamic content? I am able to find it...

 

May be you can remove and add the action again...

 

PrasadAthalye_0-1622849238276.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
dsab81
Microsoft
Microsoft

i could not find the results of sql in dynamic content when i use Execute SQL Query , but works when i use some other action like 'Get rows' etc..

Something strange. as you can see, I am able to get it in dynamic content. Is your connection to action broken? Can you add another action? What happens when you click compose and open dynamic content?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,673)