cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Collection Question: Column Organization

Hi all,

 

I have six SharePoint columns of the same type. Is it possible to pile all of these columns together into one collection? Here is an example:

 

Column 1Column 2Column 3
147
258
369

 

I would like make a collection that dumps all the data into one column like so:

 

Column A
1
2
3
4
5
6
7
8
9

 

Any help would be appreciated!

 

Farhan

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Collection Question: Column Organization

@farhandsome 

I love questions about how to transform collections!

 

Your example collection looks like this:

ClearCollect(colExample,
    {Column1: 1, Column2: 4, Column3: 7},
    {Column1: 2, Column2: 5, Column3: 8},
    {Column1: 3, Column2: 6, Column3: 9}
);

 

My solution would be this:

ClearCollect(
    colSolution,
    RenameColumns(colExample.Column1,"Column1","ColumnA"),
    RenameColumns(colExample.Column2,"Column2","ColumnA"),
    RenameColumns(colExample.Column3,"Column3","ColumnA")
);

 

---
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."

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Collection Question: Column Organization

@farhandsome 

I love questions about how to transform collections!

 

Your example collection looks like this:

ClearCollect(colExample,
    {Column1: 1, Column2: 4, Column3: 7},
    {Column1: 2, Column2: 5, Column3: 8},
    {Column1: 3, Column2: 6, Column3: 9}
);

 

My solution would be this:

ClearCollect(
    colSolution,
    RenameColumns(colExample.Column1,"Column1","ColumnA"),
    RenameColumns(colExample.Column2,"Column2","ColumnA"),
    RenameColumns(colExample.Column3,"Column3","ColumnA")
);

 

---
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."

View solution in original post

Highlighted
Super User
Super User

Re: Collection Question: Column Organization

@farhandsome 

FYI, I used your question as an example in the Collections Cookbook.  Thanks again for asking it!

https://powerusers.microsoft.com/t5/Community-App-Samples/Collections-Cookbook-50-Visual-Examples-am...

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,833)