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 / Creating a dynamic tab...
Power Apps
Answered

Creating a dynamic table/view/grid

(0) ShareShare
ReportReport
Posted on by 242

I have around 50 categories and Each category has anywhere between 1 to 15 questions and user is asked to answer these questions and answers could be free text/options/dates. 

 

Is there something like value set where i can create this structure or do I need to create all questions as a table column (this would mean I may have to create roughly 50 categories * questions per category) (This link shows https://powerusers.microsoft.com/t5/Building-Power-Apps/Building-a-Survey-where-the-responses-have-a-yes-or-no-selection/td-p/1604049 how to do this, but this would mean creating 500 columns in my case)

 

nikviz_0-1662627179094.png

 

Once I create this structure, I want the questions to dynamically appear in a Form, based on  the category user has picked up as shown below, is this possible?

 

nikviz_1-1662627205609.png

 

Any help/link would be helpful. 

Categories:
I have the same question (0)
  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @nikviz 

     

    Here is an idea but I would not use a form control but rather a gallery.

     

    consider the following:

    The questions can be a static excel table you import or a collection, i will use a collection to illustrate a solution.

     

    //type 0 = choice, 1 = textinput
    ClearCollect(colQuestions, 
     {category: "Cat A", question: "Age above 18?", options: "Yes/No", type: 0},
     {category: "Cat A", question: "UK citizen?", options: "Yes/No", type: 0},
     {category: "Cat B", question: "Age above 18?", options: "Yes/No", type: 0},
     {category: "Cat B", question: "Length of residency?", options: "", type: 1},
     {category: "Cat B", question: "Employment Duration?", options: "0-2 yrs/2-5 yrs/5+ yrs", type: 0}
    )

     

     

    Now add a Combobox to allow the user to select the category

    Items = Distinct(colQuestions, category).Result

     

    Add three labels 

    label 1, Text = "Username: " & User().FullName

    label 2, Text = "Category:  " & yourComboBox.Selected.Result

    label 3, Text = "Questions:  "

     

    Add a gallery

    In the gallery add

    • Items = Filter(colQuestions, category = yourComboBox.Selected.Result)
    • label, Text = ThisItem.question
    • set label and textinput X position the same

    ComboBox,

    • Items = Split(ThisItem.options, "/").Result
    • Visible =  ThisItem.type = 0

    Texinput, Visible = ThisItem.type = 1

     

    Result

    dynamic questions.gif

    Hope it helps

    R

     

     

  • nikviz Profile Picture
    242 on at

    @rubin_boer 
    Thank you. Yes, this helps.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard