cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Blank rows at bottom of Gallery connected to Collection and SQL table

Every time I switch views to display the view that contains a Gallery connected to a Collection, the view displays an extra blank row at the bottom of the gallery. There is a new blank row at the bottom every time I switch back to this Gallery view. Any idea why this is happening? Adding a condition to the Gallery's visible property to hide rows with blank values does not hide these extra rows. I have verified there are no extra rows in the SQL table behind the Gallery's Collection, so these are being created by the app somehow.Untitled.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Fixed it by simply creating a new collection and using that one instead. The old collection must have gotten corrupted somehow. Anyways, problem solved.

View solution in original post

6 REPLIES 6
ShantanuP
Power Apps
Power Apps

Can you please share the expression on Gallery Items property that you have here?

Anonymous
Not applicable

Ok, this is a bit complicated, but the Gallery is first populated by a button expression that is on a different view that shows when the app is first opened, before switching to the Gallery view. that expression is below. Basically, the expression checks the values of the ExtraToggle and StatusToggle controls, and if either of them is 'true' then it filters the MasterIssuesLog database according to the values selected in the StatusDropdown and ExtraDropdown controls.

 

If(StatusToggle.Value = true && ExtraToggle.Value = false, ClearCollect(Collection2,Filter('[dbo].[MasterIssuesLog]',Project=ProjectDropdown.Selected.Value && IssueStatus=StatusDropdown.Selected.Value)),StatusToggle.Value = false && ExtraToggle.Value = true, ClearCollect(Collection2,Filter('[dbo].[MasterIssuesLog]',Project=ProjectDropdown.Selected.Value && Extra=ExtraDropdown.Selected.Value)), StatusToggle.Value = true && ExtraToggle.Value = true, ClearCollect(Collection2,Filter('[dbo].[MasterIssuesLog]',Project=ProjectDropdown.Selected.Value && IssueStatus =StatusDropdown.Selected.Value && Extra=ExtraDropdown.Selected.Value)), ClearCollect(Collection2,Filter('[dbo].[MasterIssuesLog]',Project=ProjectDropdown.Selected.Value)));Navigate(ListScreen,ScreenTransition.Fade)

 

The Gallery items property is simply set to Collection2.

 

 

Does this occur if you use any of the 3 ClearCollect expressions? Just to seperate out the issue, can you check which of the clearcollect expression adds extra row? Is it possible that you have an entry in '[dbo].[MasterIssuesLog]' which matches project name but doesn't have any values for other fields?

Anonymous
Not applicable

Ok, I simplified the button expression to just the following for troubleshooting purposes:

 

ClearCollect(Collection2,'[dbo].[MasterIssuesLog]');Navigate(ListScreen,ScreenTransition.Fade)

 

So, just one ClearCollect function and one Navigate function.

 

I am still seeing the same behavior: every time I Navigate to the Gallery view (which is on the ListScreen screen) there is a new blank row added to the bottom of the gallery. For example: the first time the Gallery is displayed, after clicking the button with the expression above, there is 1 extra blank row. Then if I view the details for one of the gallery items and afterwards navigate back to the Gallery view, there are now 2 extra blank rows. So basically, every time the app loads the screen with the Gallery, there is a new extra blank row on the bottom. This makes me think it's not related to the database (which I have double checked contains no blank rows) but rather to the app functionality.

Anonymous
Not applicable

Additional troubleshooting: I added a button on my Gallery screen with the following expression:

 

Remove(Collection2,First(Filter(Collection2, Title="")))

 

This was an attempt to remove a blank record/row from the gallery, but it didn't work: when I click this button nothing happens, there are just as many blank rows as before. This makes me think there is something going on with the UI that displays blank records/rows that are not actually in Collection2.

Anonymous
Not applicable

Fixed it by simply creating a new collection and using that one instead. The old collection must have gotten corrupted somehow. Anyways, problem solved.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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