cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Goutham
Helper II
Helper II

export records from PCF Dataset

Is there any way to export all records in custom designed PCF dataset grid? 

Context.parameters.dataset.records gets record for current page but i need to get all records , apply some logic  and export data on click of custom command bar button. Export data part is handled but my core issue is to get all records without changing page size.

Any inputs are greatly appreciated!!

3 REPLIES 3
DianaBirkelbach
Super User
Super User

Hi @Goutham , 

 

If you don't want to load all records, I suppose you don't want to display it. Maybe a PCF is not the best fit for your purpose. What about using a CustomAPI to transform data, which you can call from your ribbon button? Or maybe a Virtual Entity (Table) where you can use the standard export possibilities?

 

Hope this helps!
Kind regards,

Diana

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thank you @DianaBirkelbach !!

 

I need to display records  in a view using custom PCF grid and export them but i see command bar buttons are not visible when using this custom dataset pcf control in dashboard. So , we are designing a custom "export to excel" functionality which is similar to  OOB "export to excel". I was just checking for ways to retrieve all records in dataset without additional web API calls.

 

For now, I have to make another webApi calls to retrieve records and convert push to excel.

DianaBirkelbach
Super User
Super User

Hi @Goutham , 

 

Just want to check that you are aware of the dataset feature.
You don't need to use webAPI calls if you have a dataset PCF. You can use the dataset.paging (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/paging?WT.mc_id=B...)

It's possible to set the pageSize to 5000 for your dataset, and load the next pages (loadNextPage or loadExactPage).

 

Hope it helps!

Diana

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Kudoed Authors
Users online (3,859)