cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Bug: Selecting a record in Gallery takes you to the wrong record in a related form

Sometimes, when you select an entry in a Gallery which takes you to another screen with Form and Gallery controls where Item is set to Gallery.Selected, PowerApps will display the wrong record in the related controls. The issue is related to the timing of the click/tap in the Gallery (has the screen fully refreshed).

 

Setup:

I have an OrderHeaders table and OrderDetails table in SQL Azure DB.

In my PowerApp I have a screen with gallery galOrderHeader.

I have another screen with a form frmOrderHeader that shows the details of the OrderHeader selected in galOrderHeader. This screen also has a Gallery galOrderDetail showing the OrderDetails related to the OrderHeader selected in galOrderHeader.

A 'Next' button in galOrderHeader takes the user to the screen with frmOrderHeader and galOrderDetail.

 

Observed Behavior (App contains two OrderHeader records, Bob and Jane:

1. Click entry 'Jane' in galOrderHeader to open the screen with frmOrderDetail and galOrderDetail. Correct data is displayed.

2. Click 'go back' to return to the first screen. 

3. Wait for the screen to fully refresh.

4. Click entry Bob in galOrderHeader to open the screen with frmOrderHeader and galOrderDetail. Correct data is displayed.

5. Click 'go back' to return to the first screen.

 

Now perform the above steps again, but do not wait for the first screen (with galOrderHeader) to fully refresh in step 3. You will still be able to click the button to take you to the next screen - initially, you will see the record for Bob but after a second or two it will change to show Jane again. I have even seen the frmOrderHeader show the details for one record but galOrderDetail show details for another.

 

This behavior is the same in the editor, web player and on mobile.

 

The correct record should always be shown in the related controls, even if that means preventing a user from making a selection until the Gallery has finished refreshing.

 

Screen recording demonstrating the bug: https://1drv.ms/v/s!Ag1ZVAvAeJJnt70lD6q7PyOzXN09HA

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

It's a while ago now, but I believe I fixed this by changing the action of the 'next' button and including a context variable representing the selected item in the gallery, something like:

Navigate(scnDetail,Fade,{conRecord: ThisItem})

I then set the controls on the following screen to be based on conRecord rather than on GalleryX.Selected.

Hope this helps!

View solution in original post

10 REPLIES 10
Community Support Team
Community Support Team

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

Hi PaulD1,

 

Thanks for the detailed information.


So far, I haven’t seen such an issue on my side. I tested with several data sources, SQL table, SharePoint list, CDS entity. It seems that they are all working normally.


Have you tried with a different data source to see if it will get the same issue?


Please make sure the Internet on your side is working fine.


If possible, please provide your Session ID for further investigation. I will try to involve someone to look into it.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

Thanks @v-yamao-msft

 

Please let me know how/where to get the Session ID.

 

Cheers

Paul

Community Support Team
Community Support Team

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

Hi @PaulD1,

 

You could get the Session ID under File>Account>Diagnositcs>Session Details.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

Thanks @v-yamao-msft. Please see below session details.

 

As per the screen recording in the original post, this behavior is absolutely consistent for me, regardless of the platform running the app (studio, web player, iOS, Android and WinMob).

 

Session ID: a0a1fe71-8737-48de-ff42-ee47c078792d
PowerApps 2.0.706

Highlighted
pjbryant
Level: Powered On

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

Paul - did you ever get a resolution for this?  I am seeing the same behaviour on iOS, web, Android and Windows.  On all I can wait as long as I like, or even refresh the gallery yet still the first time a user selects a record, it always goes to the first on the screen. Go back, and then thereafter it works OK.

Sarang24Dev
Level: Powered On

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

I am having the same problem.  For my users, the information in gallery is different that the information in the formviewer based on gallery.selected.  When check the same in the powerapps edit view, the information is normal. What causing this problem?

Super User
Super User

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

It's a while ago now, but I believe I fixed this by changing the action of the 'next' button and including a context variable representing the selected item in the gallery, something like:

Navigate(scnDetail,Fade,{conRecord: ThisItem})

I then set the controls on the following screen to be based on conRecord rather than on GalleryX.Selected.

Hope this helps!

View solution in original post

SteveDieke
Level: Powered On

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

All - I have the same issue with the out of the box "start from data" template and a SharePoint list as a data source and I think I found a bug in a Preview Feature running on iOS, the browser doesn't seem to have the issue.  Here's my setup.

 

1) Datasource = O365 SharePoint list with multiple columns that include text, choice and managed metadata fields.  You need more than 1 row to see the issue

2) UI = Records Browse Form > Record Detail Form > Record Edit Form

 

When I run the app from a iOS device, I go to the Records Browse Form, select a record and it takes me to the Records Detail form and I can press the pencil icon to get to the Record Edit Form.  All is well.

 

I back out of the Edit and Detail forms to get back to the Records Browse Form and select a different record.  It takes me to the Record Detail form but it shows me the data from the first selected record not the one I just selected.  If I then click the pencil on the Record Detail Form to go to the Record Edit form, it shows me the correct record (the second selection).  Both the Record Detail and Record Edit form's data sources are set to recordBrowseFormGallery.Selected

 

I tried PaulD1's suggestions and the same behavior happend with the wrong record being shown on the Record Detail Form the second time I selected a record.

 

I found if I turn off the Improved App Rendering preview feature in App Settings > Advanced Settings, Save and re-publish, the issue goes away.  I see the correct selected record through the process Browse > Detail > Edit no matter how many times I select different records on the Record Browse Form

 

This seems to be a bug in this preview feature.  Can someone else verify they are seeing the same thing? 

 

Steve

NickDewitt
Level 8

Re: Bug: Selecting a record in Gallery takes you to the wrong record in a related form

I can confirm I am seeing the same issues with an OOB sharepoint list app, turning off "improved" rendering has fixed that for me, but I am having other basic problems like edit forms clearing their info before I have patched them into a single update record.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors
Users Online
Currently online: 303 members 6,034 guests
Please welcome our newest community members: