cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DiegoB
Frequent Visitor

Incorrect behavior in dropdowns - Wrong choices while using in Gallery

Hi All, (sorry for the long email)

 

I have a serious control/UI problem,

Im creating an app with a gallery as a form (where you can update the information in the first screen).

The gallery has 3 independent dropdowns (less than 8 options each) with a Patch function during onChange, so everytime you change the dropdown it sends the Patch to a sharepoint list.

 

The app works like a charm (on a database level), but is having an error ramdomly (Some times when you change too much the selections or sometimes when you start for the first time).

 

Error description:

When I use one of the dropdowns in an specific record, the other records in the screen change the selected options ramdomly (not afecting the database, a.k.a. not triggering the Patch onChange) but causing confusion to the user.

 

A workaround It's helping is a message for the USER "If you notice a weird behavior in the dropdown, please click on the icon "REFRESH DATABASE" [Icon with a Refresh()].

 

Im using this properties in each Dropdown: 

-Items: Table(record,record)

-Onchange: Patch(Database,thisItem,"Field":Dropdown.Selected.Value)

-Default: If( IsBlank(ThisItem."Datafield),"Option 1",Lookup(Database, ID = ThisItem.ID,"Datafield")

-Reset: False

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @DiegoB ,

This is a known issue when triggering an action from within a gallery from an unbound control. It causes unbound controls in other records to reset.

One solution is to save one record at a time, but it can be overcome by binding the control to a field in the gallery source, Patching to this field and making the field the Default of the control. This is relatively simple if you are using a collection as the gallery source as you simply use AddColumns to temporarily store the data as above. 

 

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.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @DiegoB ,

This is a known issue when triggering an action from within a gallery from an unbound control. It causes unbound controls in other records to reset.

One solution is to save one record at a time, but it can be overcome by binding the control to a field in the gallery source, Patching to this field and making the field the Default of the control. This is relatively simple if you are using a collection as the gallery source as you simply use AddColumns to temporarily store the data as above. 

 

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 @DiegoB ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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 ,

 

Thank you very much for the help,

It was solved with your solution, now its working perfectly!

 

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,377)