Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
3.4k views
in Power Apps by 2 2 3
edited by

In PowerApps, I'm using a gallery to display a list of names I've selected inside the gallery I've inserted a Combobox with a bunch of work task codes, this is being saved into a local collection.

add ComboBox inside Gallery in PowerApps

when I close the app and re-open it the Combobox that is beside each name no longer shows the assigned task code. I have tried placing the task codes in both the DefaultSelectedItems and Items but can not seem to figure out how to retain the selected code once I reopen the app. I have a save button with the following 

Clear(Myteam); ForAll(Gallery_team.AllItems, Collect(Myteam,{Position:ComboBox_position.Selected.Value}));
 SaveData(Myteam "Savedteam")

1 Answer

4 like 0 dislike
by 48 54 93
selected by
 
Best answer

Before SaveData, LoadData, and ClearData functions can only use correctly in a dvice , but now they can be used when playing an app in a web browser as an experimental feature.

It is disabled by default.

To enable, navigate to Settings > Upcoming features > Experimental > Enabled SaveData, LoadData, ClearData on web player." and turn the switch on

before we have to make a work around as they were only worked on adevice such as phone or tablet
and we have to open the app on a device and make some steps , as the collection in the memory will lost after closing the app so we need to save the data to a local collection,
in your Issue i tried on my side

  • I create a collection for the combobox

  • in the OnChange property of the combo

  • I add save button and on the OnSelect property
  • Save the app and open on a dvice "you mentioned that you know this as it will give yoy an error while saving on the prowser"

  • then In the OnStart property of the app

YOU can set the defaultselecteditem to be the first choice in the combo
when selecting now the save button it will save your collection data in the device storage
finally close the app and open again it will show you the data saved on the storge

by 2 2 3
0 1
Not sure how this answered the question.
As you can see above I'm using a gallery to compile a list of staff names in the gallery I have inserted a combobox, in the combobox I have a list of coded tasks unter combobox Items. what I want to do is be able to save the selected coded task to a local saved collection (and yes I have tried it on the mobile app as well as have experimental webplayer on) so if the user closes the app and then tries to go back to the list of names the selected task should be displayed. I will also mention that this app is to be used offline so local save is a must.
by 48 54 93
1 0
Please, check the updated answer!!
by 5 7 14
0 0
@Away4mhome Please refrain from using such language and begin your response by thanking everyone who has attempted to assist you; else, your ability to post questions will be suspended for 7 days!
If you don’t ask, the answer is always NO!
...