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 / Add multiple Sharepoin...
Power Apps
Unanswered

Add multiple Sharepoint Columns in a Collection for a repeating table

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have multiple multi-line text box columns in Sharepoint that store information that I want to use for a repeating table.

The repeating table is using a Gallery and the Gallery is connected to this collection I'm building.

 

It looks like I am able to pass 1 Column to the Gallery using the following method but I'm not sure how to combine the rest of the columns into a single collection.

 

The multi-line text box store the information using a new line for every item: i.e:

New York
Chicago
Miami


I put this code in the OnVisible Property of the screen

ClearCollect(MyItemsCollection1, 
 ForAll(Split(Left(Gallery1.Selected.'City',Len(Gallery1.Selected.'City')-1), Char(10)),
 	With({_line: Split(Result, ";")},
 { 
 CCity: Last(FirstN(_line, 1)).Result
 } 
 )
 ) 
) 

 

and then simply set the Items property of the Gallery to:

MyItemsCollection1

 
This works great and in the example above, the gallery loads 3 rows with the correct result.

 

How Would I add another column in this collection so that the next set of repeating text boxes are filled?
(In red is what I'm trying to accomplish).

WorkHard_0-1645654724676.png

 

Categories:
I have the same question (0)
  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @Anonymous honestly, you should rethink your table design. Multiline Textfields should definitely not be used to hold "records".

     

    That said you coule do the following. For each Multiline Textfield create a collection based on your existing Split() logic.

     

    Then you would use a ForAll as you did in your code but like this

     

    ForAll(Sequence(CountRows(collection xyz)), {column1:Last(FirstN(collectionxyz, ThisRecord.Value)), column2:Last(FirstN(collection123, ThisRecord.Value))})

     

    This approach assumes that each line number in all multiline textboxes relate to each other.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @PowerRanger. How do you propose I store them? That's how it was done in InfoPath forever. It's an issue with Microsoft not offering repeating tables out of the box in Power Apps. I can't use multiple Sharepoint lists to hold the data for a repeating table so I'm stuck with workarounds.

    In your example, I'm not sure why you add "ThisRecord.Value" when you are trying to join the collections together. Aren't the collections themselves supposed to hold the reference of the ThisRecord.Value when I create them? (in the Split() logic).



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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard