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 / Forall gallarey to out...
Power Apps
Answered

Forall gallarey to output PDF of detail container.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a gallarey and deail container.

 

The gallarey is used to pick a project.

The deail container is used to display deails of the project you picked and the relaed data from other data sources.

 

When I use PDF function to output the container for a single project, I can output PDF with no problem.

 

But I don't know if there's a way to output PDFs for all the projects automatically.

Does anyone know if there's a way to output pfd for all the projects in the gallarey?

I first thought using Forall to iterate through the projects, but Forall doesn't accept to use Set or Update context, I even used Collect function to set variables in the detail container but it didn't work. 

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Could you please share more details about your scenario? Would you like to generate PDF files from all items of the Gallery?

     

    First of all, as in the official doc says, the PDF function allows you to select a screen or portions of a screen for export to a PDF object (blob). If you have not selected an item in the Gallery, there will be nothing or only default values within the container. The PDF function will generate a file with blanks.

     

    As a workaround, you need to create a collection to include all related values from other data sources based on current Gallery item and send the collection to Power Automate flow to generate files

    Clear(collection);ForAll(Gallery.AllItems, Collect(collection, {..., ..., ..., ...}))

    Solved: ForAll to produce PDF pages - Power Platform Community (microsoft.com)

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for trying out help me.

     

    I set a specific container for PDF, which fetches data with Lookup and Filter refering to ID of selected items.

     

    Because Forall doesn't accept setting Variable, I tried Last(Collect()) and Select() to pass the ID.
    However, it seems Select doesn't work properly within Forall.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    The workaround I provided even not related to the container, you will not be able to get different screens or values in the container by iterating the Gallery, however, PDF function relies on the screen or container.

     

    Best regards,

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    As a workaround, I made a while loop myself so I can change variable for every selected item.

     

    This video helped me make a loop.

    https://youtu.be/jQtRdvpF9F0

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard