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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using stored procedure...
Power Apps
Unanswered

Using stored procedures for populating galleries

(0) ShareShare
ReportReport
Posted on by 37
I have seen, in many videos, that recently PowerApps can use stored procedures to populate galleries without need to use flows.
 
Just like this:
 
ClearCollect(myCollection, mySQLConnection.MyStoredProcedure({.. storedprocedure parameters...}).ResultSets.Table1)
 
It works great... until i get into '.Table1'. The intellisense recognizes ResultSets, but no way to recognize Table1.
 
The returned JSON object, in fact, has the right format. You can see Table1 as a member of ResultSets. But the parser says it is an UntypedObject, and can't use it... this way,
 
I have made a 'workaround', but involves lot of 'manual' processing
 
Set(varStoredProcedureReturn, myConnection.sp_miStoredProcedure({searchParameter:"foo"}));
ClearCollect(
    myCollectionData,
    ForAll(
        varStoredProcedureReturn.ResultSets.Table1,
        {
            Field1: ThisRecord.Field1,
            Field2: ThisRecord.Field2
        }
    )
)
 
I had to 'manually' map all my fields
 
Does anyone why this is happening?
 
Thanks!
 
UPDATE: I'm working with the spanish version, that, for any reason, decided to use ';' instead of ',' (I suppose it's due to the decimal separator, where we use comma instead of dot). This is what I get:

 
As you can see, the 'Table1' element is not recognized. The 'context' is a 'OnSelect' of an icon (a 'search icon'). I don't know if it's a problem of the spanish localization.
 
Thanks
 
 
I have the same question (0)
  • Pstork1 Profile Picture
    69,490 Most Valuable Professional on at
    I ran a test on one of my stored procedures and everything works fine for me. When typing in the formula are you being prompted for the Stored Procedure parameters and do they match what you are inputting?  Here's the command line I am using in my button to get the collection
     
    ClearCollect(MyCollect, SQL.dboselectbylocation({City: "Cleveland",State:"OH"}).ResultSets.Table1);
     
    And this is a screenshot with the Items property of the gallery set to MyCollect
     

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard