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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (6,063)