Skip to main content

Notifications

Community site session details

Community site session details

Session Id : D4bKxZhdwmcG98dBdkSgMp
Power Apps - Building Power Apps
Answered

Enabling User Specific Favorites / Bookmarks in Gallery

Like (0) ShareShare
ReportReport
Posted on 5 May 2023 01:10:49 by

Good evening, everyone. 

I am putting together an app that displays a list of content in a vertical gallery. I would like for each user to be able to mark their own favorite or bookmarked content within the gallery and be able to access it the next time they load it up. 

 

I would like to use the bookmark icon to make things easy. My thought was to add a people column to the SharePoint list that is the data source for the gallery. When someone clicks on the bookmarker and it's not currently highlighted, it would add that person (the current user) to the people column for that entry. Similarly, the gallery would read who is in the people column and if it contains the current user, it would show as already bookmarked. Hopefully, that makes sense. 

 

Would this be the best way to implement a favorites option and if so could you provide some assistance with the patch code to log the current user into the SharePoint people column? Tried to find some tutorials but they don't match up to what I am looking for. 

If there any recommended alternative methods, I would be open to those as well. 

 

Always appreciate all the help everyone here provides! 

 

Categories:
  • turnerj3 Profile Picture
    2,039 on 16 May 2023 at 19:46:53
    Re: Enabling User Specific Favorites / Bookmarks in Gallery

    I haven't been successful making the patch to a person column yet. Getting a network error.

  • AdvOfJet Profile Picture
    on 16 May 2023 at 19:44:38
    Re: Enabling User Specific Favorites / Bookmarks in Gallery

    That was it. I had tried that previously and it didn't work but the issue is apparently with the SharePoint. If I change the column setting it works fine. But that's a whole different issue. 

  • Verified answer
    turnerj3 Profile Picture
    2,039 on 16 May 2023 at 19:29:53
    Re: Enabling User Specific Favorites / Bookmarks in Gallery

    I just looked into it, patching to a people column requires a record schema with more fields.

    See below. If you need those additional fields go for it, but if all you need is the users email, I'd recommend changing the column to a Text field and use the patch like we have it.

    Also a link below to where this info came from.

    turnerj3_0-1684265292019.png

     

    PATCH A SharePoint Person Column In Power Apps - Matthew Devaney

  • AdvOfJet Profile Picture
    on 16 May 2023 at 19:19:11
    Re: Enabling User Specific Favorites / Bookmarks in Gallery

    Unfortunately, it still does not work. Used the following formula since I changed the name of my People caolumn to MaxPeeps.

     

    Patch('Test Library List', ThisItem, {MaxPeeps: Text(User().Email)})

    The error that I received was a mis-matched type. Expecting Record and received TEXT. 

  • turnerj3 Profile Picture
    2,039 on 16 May 2023 at 18:53:25
    Re: Enabling User Specific Favorites / Bookmarks in Gallery

    @AdvOfJet ,

    I had to test it out. Use ThisItem and try {People:Text(User().Email)}

  • AdvOfJet Profile Picture
    on 16 May 2023 at 16:30:07
    Re: Enabling User Specific Favorites / Bookmarks in Gallery

    Sorry about the late response, wound up going out of town just after sending this. 

    I tried the formula above and wound up with the following error message I did change the data source and column reference to the correct names. 

     

    Name isn't valid. 'ThisRecord' isn't recognized.. 

     

    I tried ThisItem instead and got a type match error instead saying that it was expecting a table. 

     

     

  • turnerj3 Profile Picture
    2,039 on 05 May 2023 at 04:16:42
    Re: Enabling User Specific Favorites / Bookmarks in Gallery

    Try this patch code in the OnSelect of the bookmark icon. Patch( SharepointList, ThisRecord, { People: User().email } )

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,780 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard