Hello
The Gallery selection is changed when I edit a record and SubmitForm.
Please refer to this link
When will this issue be fixed.
I tried the following
https://powerapps.microsoft.com/de-de/blog/decouplingbrowsegalleryfromforms/
It was working before. When the powerapps got updated this is not working as expected. I cannot see the record data in my Display Screen
Please suggest how to fix the same
Thanks And With Regards
Partha
🙄
Tested this just now, the problem has to do with a gallery that has the Search() function as part of its items property.
This worked fine with a Sort(), Filter() in the items property but the moment I added the Search() part it looses its selection when refreshed no matter what convention is used to define the default item (I tried dozens of variations). It doesn't make a difference where the search function is nested, or if alone or in combination with other functions, as soon as it is introduced, it will not work.
Bottom line, this doesn't work as it is supposed to and its been like this for years. Almost every gallery requires a search function and having the selection randomly jump around is completely jarring and disorienting to the user and is not acceptable. Incredible that a developer is not given consistent and reliable way to control the selection in PowerApps...
This straight-up does not work! Used precisely the same thing and will not work.
Hi @kbpartha24 ,
Do you mean that after you submit an edit form, the gallery's selected item will change?
Actually, the theory is the same as the issue that you posted.
Since the gallery's Items is AddColumns(..), after you submit a record, the gallery's selected item will be refreshed.
To deal with this problem, you just need to save the selected item as a variable. Set your edit form and display form's Item to this variable.
Even if the gallery's selected item will be refreshed after you submit a record, it will not refresh your variable.
I've made a similar test for your reference:
1)set the gallery's OnSelect:
Set(CurrentSelectItem,ThisItem)
set the gallery's Default:
CurrentSelectItem
2)set the edit form's Item:
LookUp(datasource,ID=CurrentSelectItem.ID)
set the display form's Item:
LookUp(datasource,ID=CurrentSelectItem.ID)
//please replace with your data source name, your unique field, I use ID as an example
Then your display form's item will not change after you submit form.
Best regards,