cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zb
Level: Powered On

Load >2000 rows from Azure SQL Server with One-to-Many relationship

I have "three" tables in Azure SQL Server:

 

tblProjects:

- ID

 

tblBuildings:

- ID

- ProjectID

 

tblRooms:

- ID

- BuildingID

 

(The actual names are slightly different and inconsistent; my example is not a misspelling.)

 

Here's a simplified version of my issue.  It returns the correct number of DownloadedBuildingsN, but it only returns 1998 DownloadedRoomsN instead of the full 13360 rows.  

Clear(DownloadedBuildingsN);
Clear(DownloadedRoomsN);
Collect(
    DownloadedBuildingsN,
    Filter(
        '[dbo].[tblBuildings]',
        Project = 39
    )
);
ForAll(
    DownloadedBuildingsN,
    Collect(
        DownloadedRoomsN,
        Filter(
            '[dbo].[tblRoom]',
            Building = DownloadedBuildingsN[@ID]
        )
    )
)

If I set the last filter to literally any other clause than the ID for DownloadedBuildingsN (or change the formula slightly), it works as expected.  I've tried:

BuildingID = ID
BuildingID = DownloadedBuildingsN[@ID]
BuildingID = DownloadedBuildingsN.ID

 

I suspect this a SQL Server abstraction issue.  None of the posts that I've found have been about this problem using Azure SQL Server as the Data Source.  But, I hope it's just me misunderstanding.

 

I will then call SaveData() for offline use. 

I've also tried the ForAll-ID-range-divided-by-2000, with the same results.  

Session ID: 75dde5f5-30ec-4946-9669-6586fe964668

 

What am I missing?  Thanks.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,955)