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 / Loop controls dynamica...
Power Apps
Answered

Loop controls dynamically based on number of items retrieved from SharePoint library

(0) ShareShare
ReportReport
Posted on by 16

Hi,

Below is my requirement,

Requirement:

  1. Get all files within the SharePoint document library --> Folder
  2. Loop text boxes based on number of files retrieved

"How to loop control based on number of items retrieved" ?

 

Thanks in advance.

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Vijaybhanu ,

     

    Could you share more details about what you want? How do you want to loop text boxes?

    PowerApps does not have a loop construct so it's not possible to perform some action within the loop.

    However, PowerApps does have a ForAll function which evaluates a formula for all records of a table. It can traverse through all table records and perform action. Reference: ForAll 

    What's more, hope you can share more information, so that we could provide further assistant.

    Best regards,

    Sik

     

     

  • Vijaybhanu Profile Picture
    16 on at

    Hi @v-siky-msft ,

     

    Thanks for the response.

     

    I want to display two columns say file name and title. File name would be a label and title would be a text box. When user selects an item from a library say lib1 and edits, It would use the Item ID and get all the files from a library lib2 within a folder. And display those file names and titles in labels and textboxes respectively in a tabular format. For instance I have 5 files then I would like to show 5 rows with 1 label (File name) and 1 textbox (File title) in each row. The rows would be dynamic.


    I have attached sample image for your reference.

     

     

    SampleUI.png
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Vijaybhanu 

     

    If you just want to show the details, you can use a Gallery control, this automatically creates rows for each recorded items.

    You need to pass the formula to get all the records in the "Items" property. In the gallery control, you can create a Label and a TextInput and this will create number of rows based on returned output.

    For more details, you can refer: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-gallery

    A sample Expression: Filter(DataSource2, ID = ValuefromDataSource1)

    If this differs, please share more details so that we might be able to help you better.

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard