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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery Select issue w...
Power Apps
Unanswered

Gallery Select issue with accordian

(0) ShareShare
ReportReport
Posted on by 12

Hello all,

 

I am currently building an application that has a parent and a child gallery with an expand/collapse behavior. I have successfully achieved that functionality, However i am facing an issue.
I would want the collapse and expand to happen on the up and down icons within the parent gallery. However, if i select any other input like a toggle or a text field or even a dropdown the Child gallery is visible, i noticed that issue was there because the parent gallery selectable property was true. when i turned it off the accordion functionality stopped working.
What i would want is to only show child gallery on up and down arrow and not on all the inputs within the parent gallery.

 

How can i solve this issue? 

Categories:
  • illmatic_one Profile Picture
    80 on at

    Can't give you definitive help because you should include the code on the properties you have for the arrow.

     

    Generally, assuming that you are setting the visibility for the dropdown on your button icon, you need to include 'ThisItem.Submenu' afterward so it only shows the Submenu for the current item.  I.E.

    Visible:  Set(showsubmenu, !showsubmenu); ThisItem.Submenu [or whatever you've called the SubMenu in the table you've created to store the menu info]

  • jk213 Profile Picture
    12 on at

    @illmatic_one I have included the code on the arrow only. Here is the image below. These are nested galleries. The Additional Information shows up even if i click on on any other element of the parent gallery which i do not want.

    The problem is not all parent gallery items will have child items. Some have and some do not. So even if the parent gallery item does not have child item , if i click on any parent gallery element it shows up the child gallery which should not be the case.

    Any help in this?

    jk213_0-1639488762497.png

     

  • illmatic_one Profile Picture
    80 on at

    @jk213 

     

    hey there..  I mean you need to show what you have on the Items property and how you actually designed the app, which formulas you are using.  A picture of the app itself doesn't really help us help you much.  Also, I don't see the code for the arrow included here either?  Just the picture of the arrow.

     

    What is the Visible property of your submenu?  You could try adding 'ThisItem.IsSelected' to the Visible property and whatever variable you are using to toggle visibility in the OnSelect of the arrow.  For instance, if your OnSelect property on the arrow is Set(showMenu, !showMenu), then on the Visible property of the submenu you'd write 'ThisItem.IsSelected' && showMenu.   This will only show the submenu that is currently selected and only when your variable is set to true.

  • illmatic_one Profile Picture
    80 on at

    For showing the arrows only if there is a child submenu property, you need to change the Visible property of the arrows.  You could do so by using the Blank function.  Something like:  !IsBlank(ThisItem.ChildMenu).   Depending on how you've structured your table, this will only show the arrow if the ChildMenu property isn't blank.  AKA If you have a child menu, it will show the arrow but if not the arrow will be hidden.

  • jk213 Profile Picture
    12 on at

    @illmatic_one thank you for your suggestions, but i am still facing an issue. Let me show you some screenshots.
    I have updated the down arrow onselect property to 

    Select(Parent);Set(showmenu,!showmenu);
    ClearCollect(coladditionalquestions,Filter('Question Master',Title = ThisItem.Title))

     Updated the up arrow on select property to 

    Select(Parent);Set(showmenu,!showmenu);UpdateContext({defaultvalue:{}});Reset(parentittaskgal)

    Even when the arrow is not present if i click on a gallery item that does not have arrow it still opens up the child gallery, that is due to parent gallery selectable property which is set to true. Can you help me fix this issue?

    Please find the gif below
    recording (1).gif

  • zmorek Profile Picture
    3,272 on at

    Select the gallery itself, does it have anything on its own OnSelect property? I notice both of your arrows have Select(Parent); if you have that expand/collapse function on the gallery itself, those arrows will select their parent (the gallery), thus triggering the expand/collapse regardless if an arrow was clicked or not.

  • jk213 Profile Picture
    12 on at

    @zmorek 

    Thank you for highlighting that, I removed the select(parent) code and it is now not showing the child gallery. However, if i click on an item that is of that parent gallery which has child items, then the arrow UP changes to Arrow down. But i do not need to change the arrow when i click on any other element of the parent gallery other than the arrow. i do not have any code on the on change or on select property of the elements. Please find example below. I have the below on code on down arrow visible property

    And(!ThisItem.IsSelected,CountRows(Filter('Question Master',Title = ThisItem.Title))>0)

    On select has below code

    Set(showmenu,true);
    ClearCollect(coladditionalquestions,Filter('Question Master',Title = ThisItem.Title))

    Up arrow has below code on visible 

    And(ThisItem.IsSelected,CountRows(Filter('Question Master',Title = ThisItem.Title))>0)

    On select has below code:

    Set(showmenu,false);UpdateContext({defaultvalue:{}});Reset(parentittaskgal)

    Below is the image for the issue arising now:

    recording (2).gif

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard