cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JFentress
Level: Powered On

PowerApps Update Causing Gallery to Not Pass Correct Item

Summary
In the afternoon of Friday, January 25, PowerApps on our tenant was updated from version 3.18124.26 to version 3.19012.19. After which, our form no longer passes the correct record on initial Navigation calls to other screens. But this only happens on the first navigation after the form is opened (or browser refreshed). All subsequent Navigation calls sends the correct "ThisItem".
 
Details
We have a PowerApps form that pulls from a SharePoint List to display items in a Gallery. We have a large number of fields, so a dropdown is used to display screens for users to go to in order to update fields. OnChange, the dropdown calls the Navigation function and sends users to the associated screen.
 
Even saving the form as another name, which updated the version triggered the issue described above. I performed various tests and attempts at a workaround but ultimately had to roll back to the previous version in order for the form to function correctly. I found the following post and verified that setting a global variable did pass over the correct record, but using the Lookup command didn't refresh "ThisItem" and would rather not have to perform a major workaround if possible to get this to work.
 
Updating the PowerApp to the new version would case the form to fail user acceptance testing. So this issue is putting us in a stand-still for form modications.
 
Current Action Plan
We have opened a ticket with Microsoft to see if we can get clarification and validation on this issue/bug. In the meantime, if anyone has ideas that I could look into, please let me know.
 
Note: From what I have read, it looks like this was an issue for others last fall as well, but was patched. Somehow this "bug" appears to have resurfaced.
1 ACCEPTED SOLUTION

Accepted Solutions
JFentress
Level: Powered On

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

I started looking through and testing a few of the Advanced Settings options. Turns out, once I turned off the "Delayed Load", the issue went away immediately. Not only did this solve the issue of it loading the wrong information the first time, it also flipped to the header screen without the 5-10 second delay.

 

Gallary Issue Resolution.jpg

View solution in original post

10 REPLIES 10
jhall
Level 8

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

I had this happen last year and was able to adapt my own application to fix the issue.  It related to when/how I "defined" variables within the application.  It may also have related to me cutting/pasting full pages across applications.  What my own solution involved me going through the Variables view and determining if/when they were being set within my application.  Once I cleaned this up a bit, the "bug" went away.  

 

From my perspective, it appeared to be that I'd somehow been allowed to create variable Definitions in different screens that contradicted each other.  This could be relating to the screen cut/paste as well as some sloppy coding on my part.

 

While you're waiting on an official answer, you might consider reviewing when that particular variable is being initialized/defined and where it being used to ensure it matches how you believe it is being populated/used.

 

chrome_2019-01-28_11-53-07.png

JFentress
Level: Powered On

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

Thanks @jhall. I'll take a look and see if there is anything odd with our variables. But we aren't using all that many and those that we have, have been in place for weeks. The main thing we are using, espeically for populating screen info is the "ThisItem" which is based on the item context.

If I go to the form that is currently working, make no changes, and perform as "Save As", which updates the PowerApps version, it then breaks. If I leave the PowerApps in the current version, there are no issues. It is possible that may the update exposed an inconsistency on our part, but I find that a little odd. Especially since this only happens on the first selection. When I make subsequent selections, the "ThisItem" is populated correctly and the forms screens load as they should.

jhall
Level 8

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

Actually, that's what triggered my memory of my own issue.  In the prior MS version, everything had worked perfectly.  Once I fixed the code that I really never should have been allowed to create, it resolved the issue when running under the newer release.

 

Mine appeared similarly in that the variable didn't appear to initialize properly.  If I recall, it was also when using a dropdown to select/display values relating to a particular entry.  User would pick item from list, fields all updated the Text value using ThisItem.property.value.   Once I started picking it would seem to work, but initial values would not display properly.

JFentress
Level: Powered On

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

Ah, good to know. Thanks! I'll see what I can find.

JFentress
Level: Powered On

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

There wasn't a variable that was jumping out at me, but I know our Gallery List had a warning on the data items that our complex formula might not work on large datasets. But we ignored that because it was working, even though I think we have around 180 SharePoint columns.


As you can see below, the current formula that handles filtering via global variables (from query string params) and sorting and searching is quite a large amount.

SortByColumns(
 Search(
  If(vRecID > 0,
   Filter(CustomerMaster_v3, ID=vRecID),
   If(vPageName="AccountOwner",
    Filter(CustomerMaster_v3, 'Account Owner'.DisplayName=User().FullName And 'Work Flow Status'<>"COMPLETED"),
    If(vStatus="",
     Filter(CustomerMaster_v3, 'Work Flow Status'<>"COMPLETED"),
     If(vStatus="NotStarted",
      Filter(CustomerMaster_v3, 'Work Flow Status'="NotStarted" || StartsWith('Work Flow Status',"Rejected")),
      If(vStatus="AwaitingCMApproval",
       Filter(CustomerMaster_v3, 'Work Flow Status'="AwaitingCMApproval" || StartsWith('Work Flow Status',"PricingUpdated")),
       Filter(CustomerMaster_v3, 'Work Flow Status'=vStatus)
      )
     )
    )
   )
  ),
  clSearchBox.Text,
  "Record_x0020_ID",
  "Bill_x002d_To_x0020__x002d__x0021",
  "Ship_x002d_To_x0020__x002d__x0028"
 ),
 "Bill_x002d_To_x0020__x002d__x0021", If(SortDescending1, Descending, Ascending),
    "Ship_x002d_To_x0020__x002d__x0028", If(SortDescending1, Descending, Ascending)
)

 

Once I streamlined it by taking out some of the filter options and got rid of the warning symbol. Then it started working again. Ug. Now to figure out how best to filter by parameters but not overwhelm the system. I might have to build duplicate gallary screens to hand specific parameters.

 

Will wait to see what we hear from Microsoft before flagging an answer.

PowerApps Staff tahoon
PowerApps Staff

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

@JFentress Can you describe how the gallery, dropdown, form, and the different screens are related to one another? For example, is the dropdown inside the gallery, or which formulas are used in Dropdown.OnChange and Form.Item.

JFentress
Level: Powered On

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

@tahoon- The dropdown screen selector is part of the gallery. OnChange, it takes the text selected to call a Navigate function to the appropriate screen. In the example below, I choose "Header" and it takes me to the Header screen.

 

In case you didn't get a chance to read my previous post. We did have a warning on the Data Items for the Gallery where it said there might be complications for large datasets. However, it was/is working just fine on the previous version of PowerApps. But the current version apparently operates a little different.

 

For testing, once I removed a bunch of the filters and was able to get rid of the warning, it started playing nice. So we are in the process of figuring out a different way to handle loading items into the Gallery as that currently seems to be the trigger.

 

Main Form.jpgHome ScreenHeader Screen.jpgHeader Screen

JFentress
Level: Powered On

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

I started looking through and testing a few of the Advanced Settings options. Turns out, once I turned off the "Delayed Load", the issue went away immediately. Not only did this solve the issue of it loading the wrong information the first time, it also flipped to the header screen without the 5-10 second delay.

 

Gallary Issue Resolution.jpg

View solution in original post

PowerApps Staff tahoon
PowerApps Staff

Re: PowerApps Update Causing Gallery to Not Pass Correct Item

Thanks for all the helpful screenshots! Glad you managed to find a workaround. I will see if someone is aware of similar issues with delayed loading.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,184)