web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Table activity in Canvas App - Select All & Pagination

(6) ShareShare
ReportReport
Posted on by 49
I am using Table activity in Canvas App where i am having more than 2000 rows to be populated in the table view. I have enabled multiple select option from the property.
 
1. Is there a provision to enable select all option in the table functionality or how to bring that option
2. Rather than displaying 2000 rows in the same page, i want a option to select pages and show 10  records in a page
 
Whether both the functionality is feasible to do?
I have the same question (0)
  • Suggested answer
    Vahid Ghafarpour Profile Picture
    12,200 Super User 2025 Season 2 on at
  • SM-06021322-0 Profile Picture
    49 on at
    Thank you @VaHix, I can understand multiple select action is available in Table view. However i am looking for selecting all Option in Table activity as it will be difficult to select all individual items  
  • Verified answer
    Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at
    Hello SM-06021322-0,
     

    Yes, both "Select All" and pagination are feasible in a Canvas App's Table control, even when dealing with datasets exceeding the 2,000-row delegation limit. However, you'll need to employ specific strategies to achieve this effectively, considering performance and data handling.

    1. "Select All" Functionality:

    • Concept:

      • You'll need to create a custom "Select All" checkbox and manage the selection state of all rows manually. 

    • Implementation:

      1. Add a Checkbox:

        • Add a Checkbox control to the header of your Table control.
        • Name it something like chkSelectAll. 

      2. Modify the Table's Items Property:

        • Modify the Items property of your Table control to include a selection column.

        • Example:

          AddColumns(
              YourDataSource,
              "IsSelected",
              If(
                  chkSelectAll.Value,
                  true,
                  false
              )
          )

           

          • Replace YourDataSource with the actual data source of your table.
           

      3. Modify the Individual Row Checkboxes:

        • Add a Checkbox control to each row in the table.
        • Set its Value property to ThisItem.IsSelected.
        • Set the Onchange property of the checkbox to update the data source with the selected or unselected value.

        • Example:
           
        • Patch(YourDataSource,ThisItem,{IsSelected:Self.Value})

        •  

      4. Update the chkSelectAll OnChange Property:

        • Update the datasource with the value of the select all checkbox.

        • Example:
           
        • ForAll(YourDataSource,Patch(YourDataSource,ThisItem,{IsSelected:chkSelectAll.Value}))

        •  
         

    • Considerations:

      • For datasets exceeding the delegation limit, this approach will only select the first 2,000 rows.
      • To select all rows (beyond 2,000), you'll need to use a server-side approach (e.g., a Power Automate flow or a custom API) to update the selection state in your data source.

      •  

    2. Pagination:

    • Concept:

      • You'll need to implement a custom pagination mechanism using variables and controls. 

    • Implementation:

      1. Add Variables:

        • Create variables to track the current page number and the number of items per page.

        • Example:

          • varPageNumber: Number
          • varItemsPerPage: Number (set to 10) 
           

      2. Modify the Table's Items Property:

        • Modify the Items property of your Table control to display only the items for the current page.

        • Example:
          Slice(
              YourDataSource,
              (varPageNumber - 1) * varItemsPerPage,
              varItemsPerPage
          )

          • Replace YourDataSource with your actual data source.

          •  
           

      3. Add Navigation Controls:

        • Add buttons or icons for "Previous Page" and "Next Page."
        • Set their OnSelect properties to update the varPageNumber variable.
        • Example Previous button: If(varPageNumber>1,Set(varPageNumber,varPageNumber-1))
        • Example Next button: Set(varPageNumber,varPageNumber+1)
        • Add a label to display the current page number and total number of pages.

        • Example:
           
        • Text(varPageNumber) & " / " & Text(RoundUp(CountRows(YourDataSource) / varItemsPerPage, 0))

        •  

      4. Handle Delegation:

        • If YourDataSource is a delegable source, the Slice function will work efficiently.
        • If it's not delegable, only the first 2,000 rows will be paginated.
        • To handle more than 2,000 rows, you'll need to implement server-side pagination (e.g., using a custom API or a Power Automate flow that retrieves data in chunks).

        •  
          

    •  

    Feasibility:

    • Both "Select All" and pagination are feasible, but they require custom implementations.
    • Handling datasets exceeding the delegation limit (2,000 rows) requires server-side logic.
    • Consider the performance implications of handling large datasets in Canvas Apps.
    • It is always best to filter the data source, so that the dataset is within the delegation limit.

    •  

    By combining these techniques, you can provide a user-friendly and efficient way to interact with large datasets in your Canvas App's Table control.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • SM-06021322-0 Profile Picture
    49 on at
    @, i have checked your link and it was not mentioned clear what to update on On Select Table activity. Also select all function was not explained

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 38 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans