Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Loading large datasource fails in FluentDetailsList #482

Open
noorsyyed opened this issue Jul 24, 2024 · 8 comments
Open

[BUG]: Loading large datasource fails in FluentDetailsList #482

noorsyyed opened this issue Jul 24, 2024 · 8 comments
Assignees
Labels
bug Something isn't working code Issue is related to a Power Apps code component Component: DetailsList

Comments

@noorsyyed
Copy link

noorsyyed commented Jul 24, 2024

Describe the bug
FluentDetailsList control doesn't work on large Dataverse tables having thousands of records, even though "Large dataset paging is toggled on and Page size is set.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Edit mode of canvas app in makers portal'
  2. Click on 'Insert and add FluentDetailsList control'
  3. Scroll down to 'Dataverse table e.g. Released Products and set DetailsList dataset'
  4. set Items property to Products table
  5. set columns_Items like below, just for a single column for now to try it out
Table(
    {
        ColName: "crc1d_itemnumber",
        ColDisplayName: "Item Number",
        ColSortable: true,
        ColWidth: 200,
        ColRowHeader: true,
        ColResizable: true
    }
)
  1. It isn't loading data , when tried on smaller tables it worked

Expected behavior
Records in table "Released Product" should load
Screenshots
image

Additional context

AB#3877

@noorsyyed noorsyyed added bug Something isn't working ⚠️ needs triage Has not been triaged by the team yet. labels Jul 24, 2024
@noorsyyed noorsyyed changed the title [BUG]: Loading large datasource fails [BUG]: Loading large datasource fails in FluentDetailsList Jul 24, 2024
@noorsyyed
Copy link
Author

Hasn't been assigned yet 😞 can somebody get a chance to triage

@denise-msft denise-msft added this to the Creator Kit - August 2024 milestone Aug 10, 2024
@ericgregorich
Copy link

I think I'm having the same problems.

@denise-msft
Copy link
Member

Are you still seeing this issue in the latest studio version?

@denise-msft denise-msft added code Issue is related to a Power Apps code component Component: DetailsList and removed ⚠️ needs triage Has not been triaged by the team yet. labels Aug 29, 2024
@lbuijtelaar
Copy link

lbuijtelaar commented Sep 2, 2024

Same problem here. When I create a new app (release 3.24083.14), insert a fluent list (version 1.1.34) and setup new Records,Fields and Columns in the control, it only works with a small dataset. When I take a "large" dataset (I don't think it is large, but according to Microsoft & PowerApps), it renders blank rows. When I use a Filter() or FirstN() on the dataset, it works, as long as the number of rows is smaller than the [Page Size] in the properties of the control. If I hypothetically set [Page Size] to 7.500 with a dataset (no Filter or FindN) with 6.500, it renders but it is very slow. Please note that when it renders, it will not show more than 500 rows (irrespective of the Data Row Limit setting of the Power App).

I guess with this it should be easy to find to root cause.

@lbuijtelaar
Copy link

lbuijtelaar commented Sep 2, 2024

Also note:

According to Microsoft's documentation on SQL Server Delegation (https://learn.microsoft.com/en-us/connectors/sql/#power-apps-functions-and-operations-delegable-to-sql-server), the Power Fx function SortByColumns() is delegable. That is true, but only if the sort column is a string. If it is an expression, than it is no longer delegable. In the past the Power Apps Studio was not complaining on the following:

SortByColumns(colData,ctxSortCol,If(ctxSortAsc,SortOrder.Ascending,SortOrder.Descending))

Now it is. The only way to do column sorting now is to create a named formula with the Power FX statements for the data source (for example: myData), without the SortByColumns. Then for each column that requires sorting, a switch must be build:

If(ctxSortCol="ID",SortByColumns(myData,"ID",If(ctxSortAsc,SortOrder.Ascending,SortOrder.Descending)),
ctxSortCol="Date",SortByColumns(myData,"Date",If(ctxSortAsc,SortOrder.Ascending,SortOrder.Descending)),
...)

@denise-msft
Copy link
Member

Thank you for confirming. Our team is currently investigating. We will keep you updated on our progress.

For anyone who is still struggling, does the modern table component meet your needs? If not, please share the reasoning if possible so we understand which features are important to continue supporting as the delta between the new component.

Also note:

According to Microsoft's documentation on SQL Server Delegation (https://learn.microsoft.com/en-us/connectors/sql/#power-apps-functions-and-operations-delegable-to-sql-server), the Power Fx function SortByColumns() is delegable. That is true, but only if the sort column is a string. If it is an expression, than it is no longer delegable. In the past the Power Apps Studio was not complaining on the following:

SortByColumns(colData,ctxSortCol,If(ctxSortAsc,SortOrder.Ascending,SortOrder.Descending))

Now it is. The only way to do column sorting now is to create a named formula with the Power FX statements for the data source (for example: myData), without the SortByColumns. Then for each column that requires sorting, a switch must be build:

If(ctxSortCol="ID",SortByColumns(myData,"ID",If(ctxSortAsc,SortOrder.Ascending,SortOrder.Descending)), ctxSortCol="Date",SortByColumns(myData,"Date",If(ctxSortAsc,SortOrder.Ascending,SortOrder.Descending)), ...)

@lbuijtelaar please note that the Details List specifically does not support automatic sorting per the documentation. Were you expecting automatic storing to work using SQL as the data source? If so, then please try using manual sorting instead.

The modern table component will support delegable data sources like SQL as well as native (automatic) sorting. Please try it out if you haven't yet.

@lbuijtelaar
Copy link

Hi Denise, the modern table component is very nice, but it does not support multi selection of rows to do something useful with these rows. The detaillist supports this and therefore is unfortunately still needed in case of my customers. The alternative (building galeries) is not efficient. So if you want people to switch to the modern table, please add single and multiple select and properties such as "selectitems", etc.

@marco-salazar-encora
Copy link

I'm facing this same issue. Modern table loads the records without use but it doesn't have the ability to add an icon o url in one of the columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code Issue is related to a Power Apps code component Component: DetailsList
Projects
None yet
Development

No branches or pull requests

6 participants