Hello, I'm struggeling with a problem of the gallery.selected item.
When I select a item in my gallery and then navigate to another screen2, I can show a field (eg "name") of my datasource ("projects") with setting item > gallery.selected. That's fine.
Now I add a form ("updateForm") on screen2 to edit and update the field "name". When I klick the button with OnSelect>Submit(updateForm). The field "name" (wich I placed outside the form on screen2) is directly showing the updated value I just had send from my updateForm. That's still fine and the way I need it.
Now the problem:
When I add a SortByColumns() on my gallery, the gallery.selected does not keep the item (I actually selected by klicking it) when I perform a Update of the datasource on my updateForm on screen2. The selected item of the gallery automatically switches to the first Item of the table (depending on the SortByColumns logic) and does not keep the one I have chosen.
So the value of "name" on screen2 now shows another datasource (because I have set Item to "gallery.selected" which is now anotherone!).
Some postings with the same issue suggested to use a variable instead. So I put a variable on the OnSelect of my Gallery:
Set(SelectedItem,gallery.selected) and replaced this in item on screen2 (now Item is set to SelectedItem instead of gallery.selected).
So when I navigate to screen2, the chosen item is shown correctly with my value "name" of source "projects". Thats fine.
But when I change the value in my updateForm on screen2 now (as before), the value of my field "name" is not show the now updated content as it did before, when I used gallery.selected directly!!!
Thats my problem: The variable is not showing the updated data in my screen2 now.
I tried with Refresh(projects) on the Submitformbutton, but that doesn't help.
Somehow the gallery.selected is sending updated data directly to screen2 while the variable SelectedItem is not.
Is there any way to handle this?
Otherwise I can only choose between keeping Item on galery.selected and not using SortbyColumns in my gallery or accepting screen2 is not showing my updated data (which is a problem for me...)
Thanks alot in advance for help. I found a couple of simmilar postings on this issue by others without a final solution (or I didn't get it..)
Regards