web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add and rename columns
Power Apps
Unanswered

Add and rename columns

(0) ShareShare
ReportReport
Posted on by 204

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 

Categories:
I have the same question (0)
  • RusselThomas Profile Picture
    4,014 on at

    Example:

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

    Hope this helps,

    RT

  • christian12 Profile Picture
    204 on at

    @RusselThomas 

     

    Thank you. Will give it a go.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard