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 extract data...
Power Apps
Suggested Answer

Unable to extract data using stored procedure via SQL connector in PowerApps

(0) ShareShare
ReportReport
Posted on by 158
Hi,
 
I have a button and OnSelect, I have a SQL request to extract data via stored procedure.  The code is as follows:
 
 
Attempt1 : 
Set(
    colDWData,
   Datawarehouse.SelBailment(
    {MonthDate:20260131, DealerGroup:"",
     ArrearsOnly: 0, SuspenseOnly:0,CalculateInterest: 0,  
    CurtailmentDueOnly:1, SortOrder:3,  IncludeAllCurtailment:0, ProductBailment: 1, ProductCapitalGrowth:0,  
    ExcludePaid:0,  ExcludeSmallValue:0,CurtailmentArrearsOnly:0,AgreementNumbers:""}
    ).ResultSets.Table1
);
 
Set(
    TypedTable,
    ForAll(
        colDWData,
        {
            DealerGroupExternalName: Text(ThisRecord.DealerGroupExternalName),
            CurtailmentDescription: Text(ThisRecord.CurtailmentDescription),  
            SortOrder: Text(ThisRecord.SortOrder),  
            AgreementNumber: Text(ThisRecord.AgreementNumber),  
            DealerGroupID: Text(ThisRecord.DealerGroupID)}));
    //        StartDate: DateValue(ThisRecord.StartDate),
 
Attempt2 :
Set(
    MyObject, // pull results into variable
  Datawarehouse.SelBailment({MonthDate:20260131, DealerGroup:"",
     ArrearsOnly: 0, SuspenseOnly:0,CalculateInterest: 0,  
    CurtailmentDueOnly:1, SortOrder:3,  IncludeAllCurtailment:0, ProductBailment: 1, ProductCapitalGrowth:0,  
    ExcludePaid:0,  ExcludeSmallValue:0,CurtailmentArrearsOnly:0,AgreementNumbers:""}
    ).ResultSets
);
Set(
    table1, // put Table1 into table1
    MyObject.Table1
);
Set(
    TypedTable,
    ForAll(
        table1, // extract JSON from table1
        {  DealerGroupExternalName: Text(ThisRecord.DealerGroupExternalName),
            CurtailmentDescription: Text(ThisRecord.CurtailmentDescription),  
            SortOrder: Text(ThisRecord.SortOrder),  
            AgreementNumber: Text(ThisRecord.AgreementNumber),  
            DealerGroupID: Text(ThisRecord.DealerGroupID)}));
 
 
For both methods, no data is returned.  The pameters with a value of "0" are boolean.  Can anyone assist please.
 
Categories:
I have the same question (0)
  • Suggested answer
    pavanmanideep Profile Picture
    503 Power Up Champ - 2025 on at
    Hi There,
     
    Please deconstruct, inspect piece by piece to identify the actual issue, it is tough to identify.
     
    Thank you.
     
    Regards, 
    Pavan Mani Deep Y
    Blog:https://ecellorscrm.com

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 291 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 282 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard