cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mariette
Helper I
Helper I

dropdown in gallery changes alle the dropdown items instead of thisItem in gallery

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

17 REPLIES 17
WarrenBelz
Super User
Super User

@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

  • The Items of the gallery.
  • The Items of your drop-down
  • The Default of your drop-down (or DefaultSelectedItems if it is a ComboBox
  • Your Patch code

 

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 WarrenBelz, thanks for your replay. I will send some screenshots. Hope you can help me.

 

 

@Mariette ,

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.

Mariette
Helper I
Helper I

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
)

 

 

@Mariette ,

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.

 

Mariette
Helper I
Helper I

Hi 

 

It is a dropdown.

@Mariette ,

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.

Mariette
Helper I
Helper I

Can some one help me.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,398)