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

how to show an empty row in a gallery based on a collection ?

Hi !

 

I'm working on my second app and once more it's a parent/child SQL table based app. Basically I have the header (above) and the lines below. The Lines are shown using a gallery based on a collection that is initialized when the header is selected with this code.

     ClearCollect( Mylines, Filter( '[CIT].[ProjectLine]',Project_number = Value(SelectedSID)));

 

My goal is to add, with the + icon, a new empty line to the bottom gallery.  So I added the empty line with

     Collect(Mylines,{}); 

And I can actulaly add many empty lines to the collection, still, the gallery shows none of the new lines. How can I refresh it  with the added empty lines ? Refresh(datasource) don't work as the collection is not accepted as a datasource.

 

fishtank.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: how to show an empty row in a gallery based on a collection ?

Hi @fsim ,

Based on the issue that you mentined, I have made a test on my side, and don't have the issue that you mentioned. The blank/empty reocrd could be displayed well within my Gallery.

 

Please check if the empty/blank record has been added into your Mylines collection property, and make sure the Gallery is binded to the Mylines collection properly.

 

Please consider re-add a new Blank Gallery within your app, then bind it to your Mylines collection, then check if the blank record could be displayed within the Gallery.

 

Please also take a try to set the Height property of the Gallery (Gallery1) to following (this issue may be related to the Height of the Gallery, please resize the Height of the Gallery, then check if the issue is fixed😞

Sum(
ForAll(Gallery1.AllItems, Gallery1.TemplateHeight),
Value
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

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

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: how to show an empty row in a gallery based on a collection ?

Hi @fsim 

 

WHen you add the empty item to gallery, go to Tab - View - Collections and check to see if your collection has the empty row added to it

 

If the collection is connected to the gallery then irt should show the empty row item

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support Team
Community Support Team

Re: how to show an empty row in a gallery based on a collection ?

Hi @fsim ,

Based on the issue that you mentined, I have made a test on my side, and don't have the issue that you mentioned. The blank/empty reocrd could be displayed well within my Gallery.

 

Please check if the empty/blank record has been added into your Mylines collection property, and make sure the Gallery is binded to the Mylines collection properly.

 

Please consider re-add a new Blank Gallery within your app, then bind it to your Mylines collection, then check if the blank record could be displayed within the Gallery.

 

Please also take a try to set the Height property of the Gallery (Gallery1) to following (this issue may be related to the Height of the Gallery, please resize the Height of the Gallery, then check if the issue is fixed😞

Sum(
ForAll(Gallery1.AllItems, Gallery1.TemplateHeight),
Value
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

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

View solution in original post

fsim
Level: Powered On

Re: how to show an empty row in a gallery based on a collection ?

Hello @RezaDorrani ,

I did check and the empty lines are in the collection.

The gallery is linked to collection as well. 😕

fsim
Level: Powered On

Re: how to show an empty row in a gallery based on a collection ?

@v-xida-msft ,

the Height was the issue.

I couln't properly select the gallery in the Canvas.

 

thanks again !

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 (7,484)