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

Wrong data is shown in a gallery

Sometimes wrong data is displayed in a gallery. However, the data becomes correct after refreshing the page.

 

Example: a user filtered gallery by a dropdown.
Screenshot 1 - after filtering (wrong data - the dates and item names are messed up)

Screenshot 2 - after refreshing the page and filtering once again (correct data).


The source is an Azure SQL server database.

 

It also happens with my other apps from time to time. Is it some sort of a cache issue? Does anyone know a way to solve it?

18 REPLIES 18

@WarrenBelz 

They're both ints.

@Margaryta ,

So you have numeric values displayed in a drop-down list (which is actually text) and the problem you are facing is testing if they are blank. I must admit I have never tried to do this, but this might be logical 

With(
   {
      wInvent:Dropdown3_3.Selected.inventory_code,
      wEmploy:Dropdown3_4.Selected.employee_code
   },
   Filter(
      '[dbo].[inventory_allocation]', 
      (
         Value(wInvent)=0 || inventory_code=wInvent
      ) &&
      (   
         Value(wEmploy)=0 || employee_code=wEmploy
      )
   )
)  

 

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.

@WarrenBelz
This variant works, however, I get a delegation warning (screenshot attached). And not all records are shown. For example, I've selected an employee and there were 3 records shown in the gallery. But actually, there had to be 5 recs.

@Margaryta ,

How many records are in your data set?
There is nothing further I can do on the blank test on your rather unusual structure.

@WarrenBelz 
The gallery's data source contains 1200 rows.

Okay, thanks anyway.

I just thought it might be some cache issue, cause it only happens from time to time and disappears after refreshing the page.

zmorek
Super User
Super User

You can increase the delegable limit up to 2000 rows in the app's settings, and assuming your data set doesn't go over that, you'll be fine (though messy in practice); you could try adding those things to a collection, then use the collection as the datasource, to get around the delegation issue.

@Margaryta ,

Up to 2,000 records, you can do this to get rid of the Delegation warning, but note that on more records, it will only work on the first 2,000 and you will not get a warning

With(
   {  
      wAllocation:'[dbo].[inventory_allocation]',
      wInvent:Dropdown3_3.Selected.inventory_code,
      wEmploy:Dropdown3_4.Selected.employee_code
   },
   Filter(
      wAllocation, 
      (
         Value(wInvent)=0 || inventory_code=wInvent
      ) &&
      (   
         Value(wEmploy)=0 || employee_code=wEmploy
      )
   )
)  

 

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.

WarrenBelz
Super User
Super User

Hi @Margaryta ,

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 and sorry for the delayed response.
With this formula, I already get fewer records than there should be...
I'd leave my initial formula for now, cause that variant wasn't affected by delegation.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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