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 / Creating a Favorite to...
Power Apps
Unanswered

Creating a Favorite to all user.

(0) ShareShare
ReportReport
Posted on by 16

Hi,

 

I am creating a dashboard for document display, i have 2 data source : "Document_Library" & "Favorite_Document".
In a Gallery, "Document_Library" show all document that kept in Share Point List. I would like to create a favorite feature for all Apps user to save/favorite their documents. 

SharePoint List - Document_Library 

[Title]

A

B

C

 

SharePoint List - Favorite_Document

[Title]     [IsFavorite]     [User_Email]

A              true               1@email.com

 

 

In my gallery had insert a Toggle : 

Patch('Favorite_Document',Defaults('Favorite_Document'),{Title:ThisItem.Title,IsFavorite: true ,User_Email :User().Email})

But the "favorite" feature are still not work, seek for help and advice on this apps 

 

Thank You

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @Calven_Chow ,

     

    Could you please share more details? What do you mean by the feature not working? Did it fail to create new items in Favorite_Document list? Is there any error message when using Patch function?

     

    Best regards,

  • Calven_Chow Profile Picture
    16 on at

    Hi @v-jefferni ,

     

    In Favorite_Document list, receive new items from Patch function. But the Toggle switch in Gallery1, will turn "false" after every refresh or navigation. 

     

    Favortie-Document list: 

    [Title]     [IsFavorite]     [User_Email]

    A              true               1@email.com

    A              false               1@email.com

    A              true               1@email.com

    A              true               1@email.com

     

    **Table result after Toggle Switch "reset" to default after every action. 

    ** Toggle Switch's default is blank 

  • v-jefferni Profile Picture
    on at

    Hi @Calven_Chow ,

     

    How many items are there in Document_Library list? If the number is below 2000 and never exceed, you can change the number of data row limit in Settings to 2000, create a collection OnStart/OnVisible:

    ClearCollect(colDocuments, AddColumns(Document_Library, "Added", false))

    use this collection as Gallery1 data source, Default of Toggle bound to ThisItem.Added. OnChange of the Toggle need to update the Added to true and then add current item to favorite list:

    Patch(colDocuments, ThisItem, {Added: true});
    Patch('Favorite_Document',Defaults('Favorite_Document'),{Title:ThisItem.Title,IsFavorite: true ,User_Email :User().Email})

     

    Best regards,

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard