Here is the code for the Gallery:
SortByColumns(
SortByColumns(
SortByColumns(
Filter(
AddColumns(
GarantiErsattning,
"Namn",
LookUp(
cashe_personuppgifter,
ID = GarantiErsattning[@PersonuppgiftsID],
Namn
),
"Efternamn",
LookUp(
cashe_personuppgifter,
ID = GarantiErsattning[@PersonuppgiftsID],
Efternamn
),
"Sortering",
LookUp(
cashe_flode,
ID = GarantiErsattning[@StatusID],
Sort
)
),
TI_sök_art.Text in Text(Artikelnummer),
TI_sök_butik.Text in Text(Onskad_atgard) & Text(ArendeID),
TI_sök_namn.Text in Text(Namn),
TI_sök_efternamn.Text in Text(Efternamn),
TI_sök_ärende.Text in Text(ArendeID),
If(
Checkbox_visa_avslutade.Value = false,
"false",
""
) in Text(Avslutad)
),
"Sortering",
Ascending
),
"Skapaddatum",
Descending
), "Avslutad",
Ascending)
So when I patch a value in "Sortering" the order in the gallery changes, as it should. The issue is that the Gallery.Selected.X value changes too.
i.e.
When I patch one value on my summary screen the order of the items in the gallery changes (which it should).
But at the same time the value for Gallery.Selected changes without me clicking in the gallery.
Im not sure I am explaining this all to well 🙂 Hope you understand.