Hi,
I have a gallery with a dropdown. When I change the dropdown and patch thisItem, it changes all the dropdown item in my gallery to the value that I patch. The patch works fine, because it changes the right item in my sharepointlist, but in my gallery it changes all the items.
Can somebody help me.
Mariette
@Mariette ,'
When you Patch something from inside a gallery, it resets all controls in the gallery (not just on the line item you Patched). If your drop-down is "unbound" (not linked to any field in the Items of the gallery), it will reset to its default value, which is what I think is happening to you.
Can you please advise the following
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Can you please supply the four items requested as Text (not screenshots).
You also have only included the Defaults, not the Items and Patch code.
Hi,
Items property is:
Choices('Aanmelding ISP-Team Angst Lijnbaan'.Indicatiegesprek)
Items of gallery is:
SortByColumns(Filter('Aanmelding ISP-Team Angst Lijnbaan';StartsWith(Clientnummer;Zoeken.Text));"Behandelingmetspoed";Ascending;"Datumintake")
default of dropdown:
ThisItem.Indicatiegesprek.Value
patch:
Concurrent(
Patch(
'Aanmelding ISP-Team Angst Lijnbaan';
ThisItem; {Indicatiegesprek:IndicatiegesprekGallery.Selected});
Notify("Indicatiegesprek is opgeslagen");
NotificationType.Error
)
Is the control a Drop-Down or a Combo Box, as what you have should work on the drop-down.
If it is a Combo Box, set the DefaultSelectedItems to
{Value:ThisItem.Indicatiegesprek.Value}
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi
It is a dropdown.
Galleries resetting when a command is invoked from inside them is a known issue, but you have the Default of the drop-down set to the value of that field in the record in the gallery (therefore should continue to show this). Is it showing this value before it "resets"?
Hi WarrenBelz,
Yes when I selected a value in the dropdown it shows the chosen value. It patch the rigth value and the right record to the sharepointlist, but in de gallery it changes all the dropdown to the chosen value in the first dropdown. When I chose a value in de second dropdown in the gallery it does not change all the dropdown in the gallery.
Can some one help me.