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

How to build response from excecute sql query and compose

So i have a Execute sql query building table1 and table2. I want to load the data into an collection. When i have 1 table i know how it works, but now i have 2 tables. So how do you build the "Response Body Json"?

I want to load more than 1 table into collections at the start of the app, else you must run 2 ore more flows and i lost performance.

 

Thank you!

2 REPLIES 2
Super User II
Super User II

@Frans_365CH 

 

One piece could be that if you are trying to return this to a PowerApp, you may want to use the "Respond to a PowerApp or Flow" action to return the response to your PowerApp instead of the generic HTTP Response action.

 


@Frans_365CH wrote:

I want to load more than 1 table into collections at the start of the app, else you must run 2 ore more flows and i lost performance.


 

Another piece could be that you should not need to use multiple Flows just because you are using more than one SQL Server table. If you have more than one query you can execute that as well from the same Flow, then use other actions like Compose from same Flow to create a customized object that has elements from both SQL Server query responses, then return that to the app.

 

You can also consider having two data sources in PowerApps and possibly avoiding the use of Flow altogether as an alternative as well. To combine elements from both data sources you can use either AddByColumns or some other ways other than that: such as for instance using two galleries and having a third gallery that combines the information from the two galleries in a specific way that you want (depending on your case) and so forth.

One piece could be that if you are trying to return this to a PowerApp, you may want to use the "Respond to a PowerApp or Flow" action to return the response to your PowerApp instead of the generic HTTP Response action.

 

This isnt working if jou have more than 1 row and they have diff formats like integer, string and Boolean.

 

Compose from same Flow to create a customized object that has elements from both SQL Server query responses, then return that to the app.

 

I have, look at the pic, but how to make the Body for Json?

 

Thanks!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,869)