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 / How can I add new vari...
Power Apps
Answered

How can I add new variables to a gallery's ThisItem?

(0) ShareShare
ReportReport
Posted on by 179
Hello!
 
I have a variabled named varGallery and I set it that way : Set(varGallery;SharepointListName)

It gives me a local copy of that Sharepoint list and allows me to quickly deal with the data in it. Now I want to add columns in it for temporary variables. I can't figure out how to do that. I could use an existing column but I would rather create temporary variables for each ThisItem. How can I proceed?
 
I found a way to do this with a collection but it doesn't work when I try to do the same to the gallery...
 
Collect(colGalleryName;{ 
    Titre:GalItems.Titre;
    NomPrenom:GalItems.NomPrenom;
    Anciennete:GalItems.Anciennete;
    Formations:GalItems.Formations;
    Telephone:GalItems.Telephone;
    Avant:GalItems.Avant
}));;
Categories:
I have the same question (0)
  • Verified answer
    mmbr1606 Profile Picture
    14,605 Super User 2026 Season 1 on at
    hey
     
     
    you can try this:
    Set(varGallery, AddColumns(SharePointListName, "TempVariable", "Initial Value", "AnotherTempVariable", 123));
    
    or with a collection:
    ClearCollect(colGalleryName, AddColumns(SharePointListName, "TempVariable", "", "AnotherTempVariable", 0));
    
    if my answer helped please mark as verified,
     
     
    cheers
  • Volt26 Profile Picture
    179 on at
    Thank you very much mmbr1606!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard