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 / Unable to access respo...
Power Apps
Unanswered

Unable to access response from stored procedure when assigning to a property using Power FX

(1) ShareShare
ReportReport
Posted on by 2
I am trying to execute a SQL Server stored procedure from power apps. The Power FX command I am using is DBName.Stored_Procedure().ResultSets.Table1
But I am not able to access the Table1 or the ResultSets. I tried assigning it to a collection but nothing seems to be returned. 
Surprisingly when I use the monitor I see that the Response Tab does have the expected response:
"body": {
    "ResultSets": {
      "Table1": [
        {....
So the stored procedure is working and it is getting executed as well as expected. But something wrong with accessing the response. 
This seems to be an issue for many people as seen in some youtube comments on tutorial videos on the same. Is there a fix to this? Or am I doing something wrong here?
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,392 Super User 2025 Season 2 on at
    Hi
     
    Is this a Model Driven or Canvas App
     
    Are you trying to access via a Connector, or are you using Power Automate?
     
    Please share the code that you are having an issue with and the error it is giving you.
     
    Power Apps don't simply "access" JSON things, so I have no idea how you are trying because you didn't share
  • MB-23070938-0 Profile Picture
    48 on at
    You need to give the power FX a detailed list of what results you're expecting. As per documentation https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/connections/connection-azure-sqldatabase
     
    Set(
        <MyUntypedObject>,
        <datasourceName>.<StoredprocedureName>( 
          { <paramName1>: "someString" }
        ).ResultSets
    );
    Set(
        table1,
        <MyUntypedObject>.Table1
    );
    Set(
        TypedTable,
        ForAll(
            table1,
            {
                BookID: Value(ThisRecord.BookID),
                BookName: Text(ThisRecord.BookName)
            }
        )
    );
     

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