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 / Show Specific Dependen...
Power Apps
Unanswered

Show Specific Dependent Questions in a Gallery

(0) ShareShare
ReportReport
Posted on by 103

I have a scenario in which I have a a bunch of questions stored in a collection and I am displaying each individual question in a single row of a gallery. Depending on what the question is the gallery row will display different controls; ex: If it's a date question, display a date picker, if a Yes/No, display a radio button and if text, display text input, etc. And some questions have dependent questions, currently I am calling the questions who have dependent questions "Parent Dependent" Questions and then the actual dependent questions are called "Child Dependent" Questions. I want to be able to display the child dependent question depending on the user's answer, but I want to only show that specific parent dependent question's child dependent question and only that child dependent question. Problem is I can't figure out a way to do it without displaying all child dependent questions if one of them shows. 

Currently my list has the columns,: Question, ID, Parent Dependent: (Shows the parent Question ID), Child Dependent: (Shows the child Question ID) and Type

ex: ID - 7, Question: Will this require more information?, Parent Dependent: (BLANK), Child Dependent: 14, Type: Yes/No
ID - 14, Question: Please type all information needed:, Parent Dependent: 7, Child Dependent: (BLANK), Type: Text

So basically I have to find a way to filter my gallery to only show no dependent questions by default and then as the user enters their answers, if a parent question's dependent condition check is true (ex: if a user selects "Yes" on a radio button control) then show that parent question's child question. 

Note: Also want to emphasize this is not a flexible height gallery because the date picker I need to use is the datepicker control for powerapps for teams and this control does not work with flexible height galleries. 

Categories:
I have the same question (0)
  • Feiteira Profile Picture
    199 on at

    Hi @Bhanes22

     

    I supose you have a collumn for each of those questions so my suggestion would be:

    1. Create the gallery and start by showing all of those questions.
    2. Insert every input possibility: Text input, Date Picker, Dropdown, etc after every question.
    3. According to the answer given for each question, show/hide by using the answer value in the Visible property of each Text input, Date Picker, Dropdown, etc, required for that question.
    4. You can also set the Required property for those fields as needed, in the same way as in step #

    To save the answers provided, use the same logic as above.

     

    Let me know if it worked for you and don't forget to click "Accept as solution" if this reply pleases you 😉

  • Bhanes22 Profile Picture
    103 on at

    Thank you for the quick response! I do not have a column for each question, each question is a row and it must be that way. Yes that is a good idea on the visibility property of the dependent question; however, I need to re filter the entire gallery when the user pick the true answer for a parent dependent question, if I don't and just show/hide questions then I will have a bunch of big empty rows in the gallery. 

  • Feiteira Profile Picture
    199 on at

    @Bhanes22 I think I get what you mean.

    You can always use the AddCollumns() with the collection and add a collumn to it that sets the visibility or not for each question, then, in the Gallery Items property, you can Filter that collection so it doesn't show the questions which visibility is false.
    Let me know if it works for you, that way 😀

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard