web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / URGENT: How to grab my...
Power Apps
Unanswered

URGENT: How to grab my stored procedure data from Power Automate flow in power apps

(0) ShareShare
ReportReport
Posted on by 39

Im trying to call a flow I created in Power Automate in Power Apps but when I type in SQLOrderdata.      ResultSets isnt popping up. 
I'm currently following this video on stored procedures in power apps 

https://www.youtube.com/watch?v=awsNLPGNI4w&ab_channel=ChinoDoesStuff

 

From 29:30 My power apps doesnt want to grab data from the flow i created. Where did I go wrong? 
please help.

 

Im trying to use  PowerApps>store prodcedure v2  which has the information i need for the gallery.

 

 

17bcfd06db768cf7201da400defccba6.png

Categories:
I have the same question (0)
  • Abhilash_Swain Profile Picture
    901 on at

    Hi @tsangd ,

    I will suggest 2 ways -


    1
    You need to check the flow what is the output.
    You need to call the flow and record the output of to a collection before using it in the gallery.

     

    Example:- 

    ClearCollect(collmasteranalystRef,'flow-SQL_Mastertable'.Run("SELECT * FROM [dbo].[Master_Analyst_Ref] WHERE AnalystEmail <> 'NA'"));

     

    collmasteranalystRef :- my collection

    flow-SQL_Mastertable:- my flow name

    My Query:- "SELECT * FROM [Mastertable] WHERE Email <> 'NA'"

     

    The result will get populated in my collection and I use my collection to display in gallery.

     

    A simple SQL query flow.

    Abhilash_Swain_0-1646296290317.png

     

  • Abhilash_Swain Profile Picture
    901 on at

    @tsangd , continuing the previous post
    2nd Method:-

     

    Please modify the stored procedure to generate a view with required output.
    You can connect to the view directly from data connection . This will help you to use the connection directly in gallery.

     

    Please give me a Thumbs up if I answered your question and mark it as a solution to help others.

    Thanks

    Abhi

  • tsangd Profile Picture
    39 on at

    @Abhilash_Swain Thank you for your reply, could you tell me the procedure to do this?
    Im new to stored predures in power apps. thank you

  • Abhilash_Swain Profile Picture
    901 on at

    Hi @tsangd ,
    Please follow below steps and I hope i will help.

    Fore the 2nd method which I suggested earlier.

    1. Modify your stored procedure to create a view of your result. ( Reference to create view).
    2. Go to flow and create a power apps trigger flow.
    3. Select add new step and search for "Execute stored procedure V2"
      Abhilash_Swain_1-1646303748361.png

       


      First time, it will ask you to create the connection. Provide your SQL server details and create the connection.

    4. The server name will appear at"1" and  DB inside server will appear based on your connections.
    5. You can see the stored procedure available in the DB. ( No 4 in the screen shot show the parameters for the selected stored procedure. It will vary procedure to procedure.)
    6. Save the flow and test it by manual trigger. (Check If the flow triggers the Procedure or not. It must create a view at the end of the procedure with desired result.)
    7. Now in Power Apps , you need to initiate this flow. ( By click of a button, on form load, on visible or any other events . Below sharing button event to call the flow.)
      Abhilash_Swain_2-1646304607311.png

      Select the Button> On Select>Click Actions > Power Automate . You can see all the flows available in that environment .

    8. Select the procedure flow and it will looks like 
      Abhilash_Swain_3-1646305943219.png

       

    9. On completion, The View mapped to gallery will refresh and you can see the fresh data.

     

    Hope this will help.

    Please give me a Thumbs up if I answered your question and mark it as a solution to help others.

    Thanks

    Abhi

  • tsangd Profile Picture
    39 on at

    @Abhilash_Swain Thanks so much for the help, If  I get any problems , I will message you.

  • tsangd Profile Picture
    39 on at

    @Abhilash_Swain 

    tsangd_0-1646356989586.png

    for no.3 my view that i created isnt showing in my power automate flow even after  i saved it in my microsoft sql server. why?

  • tsangd Profile Picture
    39 on at

    @Abhilash_Swain 
    I made a view , then i called the view table in a stored procedure like this 


    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE allTable
    AS
    BEGIN
    SET NOCOUNT ON
    SELECT *
    FROM allTableView
    END
    GO

    I then created the flow you made ,

    How do i connect the flow to my gallery? 
    I can connected the procedure flow to a button but for gallery i dont know

  • tsangd Profile Picture
    39 on at

    for step 9 how do i correctly map the flow to the gallery?
    I tried adding the flow to my gallery but it gives me an error

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard