Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Rename Column in nested collection

(0) ShareShare
ReportReport
Posted on by 178

Hi Guys,

 

How do I rename a column within a nested collection.

 

Example collection A, has a nested collection within column header age.

 

I want to change the column value within Collection A nested collection Age column Result to Output

RenameColumns(A,Age ,"Result ", "Output")

 

Tried this although does not work.

 

Any help is greatly appreciated.

 

Thanks 

  • Verified answer
    Re: Rename Column in nested collection

    Hi @christian12 ,

     

    I assume there is a collection:

    ClearCollect(
     A,
     {Id:1,Age:Table({Result:"1"})},
     {Id:2,Age:Table({Result:"1"},{Result:"2"})}
    );

     

    You could use this formula to rename the 'Result' to 'Output':

    GroupBy(RenameColumns(Ungroup(A,"Age"),"Result","Output"),"Id","Age")

     

    Best Regards,

    Bof

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard