Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Add and rename columns

(0) ShareShare
ReportReport
Posted on by 178

Hi Guys,

 

Was wondering using clearcollect how do you add columns as well as rename a existing column in the one line of code.

 

Example: collection A has a column called results. I want to rename results to "type" and add in another column called "style".

 

This line of code will run a few times as uses can update its row values, so i need a if statement that if the columns already exist not to add or renanme.

 

Any help is greatly appreciated.

 

Thanks 

  • christian12 Profile Picture
    christian12 178 on at
    Re: Add and rename columns

    @RusselThomas 

     

    Thank you. Will give it a go.

  • RusselThomas Profile Picture
    RusselThomas 4,012 on at
    Re: Add and rename columns

    Example:

    AddColumns(RenameColumns(myCollection, "results", "type"), "style", "some style")

    Hope this helps,

    RT

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,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard