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 / directly call SQL stor...
Power Apps
Suggested Answer

directly call SQL store procedure and return two table set

(3) ShareShare
ReportReport
Posted on by 314
My Power Apps directly call a SQL stored procedure that return two sets of tables; however, it fails to retrieve the second set.
Any help welcome.
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,442 Super User 2025 Season 2 on at
    Hi
     
    How in the world do you think we can help you with that statement by itself....
     
    Come on, please respect your time and ours.
  • Jsunnb Profile Picture
    61 on at
    I do think you are pretty vague with your question, but if I had to guess what you are trying to do is get to the second table your stored procedure returns.
     
    This is the format I used to try and get a table to return and it seems to work:
    ClearCollect(
        collectionName,
        Table(
            DataSourceName.StoredProcureName(
                {
                    input1: SomeValue,
                    input2: SomeValue,
                }
            ).ResultSets.Table1
        )
    )
    
    You can see the .Table1, you'd replace that with .Table2 to get the second set of data. Hope that helps you.
  • MB-23070938-0 Profile Picture
    48 on at
    If you are using on - premises server, then you can only get 1 results set, multiple are only available on Azure. 

    https://learn.microsoft.com/en-us/connectors/sql/
    • The following limitations apply to invoking a stored procedure on an on-premises SQL server:

      • Output values for OUTPUT parameters aren't returned. You can still specify input values for OUTPUT parameters.
      • ResultSets value is Untyped.
      • Return value isn't available.
      • Only the first result set is returned.
      • Dynamics schemas aren't supported for result sets.

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard