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 / 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 222
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
    576 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard