Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

how to show gallery records based on selections

(0) ShareShare
ReportReport
Posted on by

i have SP gallery in powerapps, i want to add star icon in each record to subscribe it as favorite by user. what all the records user subscribe by clicking star should load and this should load every time when user login, each user will have his favorite loaded records. and one more button screen to load All records. how to do this.

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: how to show gallery records based on selections

    Hi @venky232,

    This feature is only for app on mobile phone.

     

    To load the previous data when you start the app, the only method is to use the load data and save data.

     

    If you want to achieve this on Desktop version, there is no way to achieve this need.

     

     

     

  • venky232 Profile Picture
    on at
    Re: how to show gallery records based on selections

    then ,how to do for Desktop version

  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: how to show gallery records based on selections

    Hi @venky232

    I have mentioned that this feature is supported on mobile app or web player on mobile phone, if you operate it on your computer, I am afraid it is not possible.

     

    Check our official doc for reference:

    SaveData, LoadData, and ClearData functions in Power Apps - Power Platform | Microsoft Learn

  • venky232 Profile Picture
    on at
    Re: how to show gallery records based on selections

    i added above 2 codes  

    OnStart propertyOnSelect property of the star icon:

    and also turned on expermential feature but nothing working.

    it is not selecting star icon

  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: how to show gallery records based on selections

    Hi @venky232,

    Just do fine tuning to add this column to this temporary collection.

     

    You need to know that you should generate a collection to include this user column at very first(run OnStart of the app, or anyway), then create another collection once you click the star icon.

    This original collection should be like:

    ClearCollect(colSubscribe,AddColumns(list,"subscriber",""))

     

    Then modify the patch formula as below:

    Patch(colSubscribe,ThisItem,{subscriber:User().Email});
    Collect(colSubscribe,ThisItem);
    SaveData(colSubscribe,"LocalSavedItems")

     

    Further, I am not sure if the situation that you could not create a column in your list affects the LoadData() or not when the app on start, you need to test it on your side.

    If it does not work, well, there is no direct way to achieve this if you don't want to change your data source

  • venky232 Profile Picture
    on at
    Re: how to show gallery records based on selections

    i dont want to save data back to list & it will not have user coloumn also. i want to store in local collection

  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: how to show gallery records based on selections

    Hi @venky232,

    Do you want to load data when the app on start?

     

    Actually, you should save the collection data to local device/web browser and load it when you open the app again.

     

    These functions can now be used when playing an app in a web browser as an experimental feature. This feature is disabled by default. To enable, navigate to Settings > Upcoming features > Experimental > Enabled SaveData, LoadData, ClearData on web player." and turn the switch on. 

     

    Here is a tip for you, you need to create a column to save the user who likes this record.

    In my scenario, I have a subscriber column to save who subscribes this record once someone clicks the star icon.

     

    You just need to add the following formula for the OnSelect property of the star icon:

    Patch(List,ThisItem,{subscriber:User().Email});
    Collect(colSubscribe,ThisItem);
    SaveData(colSubscribe,"LocalSavedItems")

    Then set the OnStart property of the App as below:

    LoadData( colSubscribe, "LocalSavedItems" )

    Set the Items property of the Gallery as:

    Filter(colSubscribe,subscriber=User().Email)

     Then you could add another Gallery by setting following formula to display all the records:

    List
  • venky232 Profile Picture
    on at
    Re: how to show gallery records based on selections

    any updates?

  • Samuel-Zhou Profile Picture
    393 on at
    Re: how to show gallery records based on selections

    @venky232I'll test it, then tell you

  • venky232 Profile Picture
    on at
    Re: how to show gallery records based on selections

    how to do this step by step

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard