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 / Saving a gallery with ...
Power Apps
Answered

Saving a gallery with 'ForAll' to a collection while keeping only one 'GUID()' id.

(1) ShareShare
ReportReport
Posted on by 73
Hello,
 
So i am saving my screens's data to collections and in one screen I have a gallery. In the gallery I have 2 controllers and these can be as many more as the user selects.
 
 
The question is each screen uses GUID() and when I save the Gallery with ForAll to collection, it saves each line with different GUID()! 
 
 
I want each record saved has the same GUID(). Next user, when saves, it will create a new GUID() for his/her record.
 
The formula I use ;
 
 
ps: the records you see in the image above are for one record. 
thank you in advance
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
    Hi
     
    Please do this
     
    Above your ClearCollect
     
    Set(_localGuid, GUID());
     
    change Volumes_ID to _localGuid and now they will all have the same guid.
     
    Another Option

    With(
        { NewGuid: GUID() },

        Now put in your ClearCollect etc code, but substitute the GUID() function for the word NewGUID, and it will have the same
       and it will not create a local variable.
    );

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 833

#2
Valantis Profile Picture

Valantis 563

#3
Haque Profile Picture

Haque 383

Last 30 days Overall leaderboard