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.
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.
then ,how to do for Desktop version
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
i added above 2 codes
OnStart property & OnSelect property of the star icon:
and also turned on expermential feature but nothing working.
it is not selecting star icon
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
i dont want to save data back to list & it will not have user coloumn also. i want to store in local collection
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
any updates?
how to do this step by step
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional