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 / Exporting Gallery Data...
Power Apps
Answered

Exporting Gallery Data to Sharepoint - "Person" Column

(1) ShareShare
ReportReport
Posted on by 15
Hi Community Members, 

I am trying to make a Power App based Homepage.
I would want this homepage to link to some basic reports BI reports. 
I also want the option for users to add their own favorite reports besides the main reportset. 

Therefor I made a menu linked to a gallery, that has a menupoint to add a report available for the user to the favorits, and a separate menupoint for removal. 



In the Gallery of the app, users can select to add an element to their favorites.
If they select an item in the gallery, a popup will show up.


If they click yes to this "Button1", I want the selected item to be exported to a SharePoint list called "User Dataset" .
Specifically in a Collumn called "UserFavorite_DS", and for that specific user. 

I have 2 Connectors in the app an Office365Users Connector and a Sharepoint connector to "User Data" .
Have been trying to make it work, but wasnt able to.
Could I kindly ask for the community for help ? 

I Have attached an example of my test dataset. 
Please note that the UserFavorite_DS column in the SharePoint List is a "Person" Column type.
(Attila Liebmann already has some favorites, but this is only why I wanted to test some things so I added it manually in the list.)



I was experimenting with this formula, but I might be not on the right track : 

 
// Get the current user's details using Office365Users connector
Set(currentUser,
    {
        DisplayName: User().FullName,
        Email: User().Email,
        UserPrincipalName: Office365Users.UserProfileV2(User().Email).userPrincipalName
    }
);
 
// Add or update the selected item in the SharePoint list
Patch(
    'User Dataset',  // Replace with your exact SharePoint list name if different
    LookUp(
        'User Dataset',
        Mail_DS = User().Email &&
        Bericht_DS = ThisRecord.Bericht_DS
    ),  // Find the item to update based on unique fields
    {
        UserFavorite_DS: {
            Claims: "i:0#.f|membership|" & Lower(currentUser.UserPrincipalName),
            DisplayName: currentUser.UserPrincipalName,
            Email: currentUser.Email
        }
    }
);


Please help! 
Thank you in advance
Categories:
  • Suggested answer
    CU18061035-1 Profile Picture
    18 Microsoft Employee on at
    hey
     
     
    can u try this approach:
    Set(currentUser,
        {
            DisplayName: User().FullName,
            Email: User().Email,
            UserPrincipalName: Office365Users.UserProfileV2(User().Email).userPrincipalName
        }
    );
    
    If(
        IsBlank(
            LookUp(
                'User Dataset',
                Mail_DS = currentUser.Email &&
                Bericht_DS = ThisRecord.Bericht_DS
            )
        ),
        Collect(
            'User Dataset',
            {
                Mail_DS: currentUser.Email,
                Bericht_DS: ThisRecord.Bericht_DS,
                UserFavorite_DS: {
                    Claims: "i:0#.f|membership|" & Lower(currentUser.UserPrincipalName),
                    DisplayName: currentUser.DisplayName,
                    Email: currentUser.Email
                }
            }
        ),
        Patch(
            'User Dataset',
            LookUp(
                'User Dataset',
                Mail_DS = currentUser.Email &&
                Bericht_DS = ThisRecord.Bericht_DS
            ),
            {
                UserFavorite_DS: {
                    Claims: "i:0#.f|membership|" & Lower(currentUser.UserPrincipalName),
                    DisplayName: currentUser.DisplayName,
                    Email: currentUser.Email
                }
            }
        )
    );
    
    
    button onselect:
    Set(
        confirmationVisible,
        true
    );
    
    if my answer helped please mark as verified sanswer,
     
     
    cheers

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
timl Profile Picture

timl 122 Super User 2026 Season 2

Last 30 days Overall leaderboard