web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cascading checkbox gal...
Power Apps
Unanswered

Cascading checkbox gallery

(0) ShareShare
ReportReport
Posted on by 24

I am following a video tutorial by  @Mr-Dang-MSFT  that shows a gallery within a gallery

I used this approach as a cascading checkbox wherein a parent can have multiple children

 

Now my question is if there is no child, it still shows a checkbox with no value (just a textbox). and when I check the Gallery.AllItems count, it shows 1 instead of zero.

 

How can I fix this?

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    on at

    Hi @akosila ,

    Could you show me the link of the video tutorial by  @Mr-Dang-MSFT  that shows a gallery within a gallery?

    Just based on your description, I can not understand this problem very good.

    Maybe you could try this:

    Set the checkbox's Visible:

    If(CountRows(Gallery1.AllItems)=0,false,true)

    Then when the situation that you descripted appears, the check box will disappear.

     

     

    Best regards,

  • akosila Profile Picture
    24 on at

    Hi @v-yutliu-msft 

     

    Heres the link https://www.youtube.com/watch?v=IjiZDVHAnZo

     

    I already did what you suggested to count the rows but it is returning 1 instead of zero, so it still shows. The CountRows is correct if there sub items. so if there is one sub item, then CountRows(Gallery1.AllItems) returns 1.

    gallerysubgallery.png

  • Mr-Dang-MSFT Profile Picture
    on at

    Hi @akosila,

    It sounds like you are encountering an issue involving checkboxes and nested galleries.

     

    This is what I understand:

    • You have one gallery nested in another
    • You have checkboxes in both the child and parent galleries.
    • The parent gallery's checkbox affects the visibility of the child gallery

     

    Can you describe your scenario a little more with some screenshots when things go wrong? 

  • akosila Profile Picture
    24 on at

    Hi @Mr-Dang-MSFT  thanks for your question. 

     

    Yes, I have a gallery within a gallery, just like in your youtube video

    I have a checkbox inside the gallery just like in the attached image

    gallerysubgallery.png

     

    I just crossed out the text. The items have this grand parent-parent-child relationship

    the grand parent is a dropdown - DropdownGParent
    parent is a gallery- galleryParent
    child is a gallery - galleryChild

    DropdownGParent

    Items: Distinct(colAllItems, Title) //colAllItems comes from a single sharepoint list that contains Title (for Grand parent, Parent, Child)

    galleryParent
    Items:
     GroupBy(Filter(colAllItems, Title = DropdownGParent.Selected.Result), "Parent", "GroupedByParent")
    Inside galleryParent is a checkbox (CheckBox1) - Text: ThisItem.Parent

    galleryChild
    Items: Distinct(GroupedByParent, Child)

    Visible: CheckBox1.Value //as per your video, gallery will show when the checkbox is checked

    Inside galleryChild is a checkbox (CheckBox2) - Text: ThisItem.Result 


    Now my problem is there are grandparents who do not have a parent items ; and some parents do not have child item/s.

    But in my case, let's take the galleryParent and galleryChild as an example, the galleryChild and CheckBox2 still shows if the parent has no  child (see my screenshot above). 

     

    let me know if you need more explanation.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard