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 Questionnaire
Power Apps
Unanswered

Gallery Questionnaire

(0) ShareShare
ReportReport
Posted on by 144

I am building a Questionnaire app.

I need some advice on how to build the questions.
What I have done so far is build a gallery and have a database with a list of questions.

 

The issue I am facing is not every question requires the same type of response, for example, not all questions are a text box or a drop down etc, they are a mix.

 

So in my gallery I have all the different types of answers, Drop Box, text, Multi Choice List, Single Choice List.

In my database I have the question and the type next to it.

I am then hiding the form element in the gallery if the type in the data base doesn't equal the form element.

 

My issue is when i want to submit the answers to the form into a collection then into SQL I cannot define what form elements are active and what isn't.

 

Example of my Database:

IDQuestionquestion_typeWhat will show on the gallery
1Question 11Drop Down
2Question 22Text Box
3Question 33List Box Single Choice
4Question 44List Box Multiple Choice

 

Here is a screen shot of my screen you can see in the black square the different form elements, but on the right it only shows the one element.

QuestionIssue01.PNG

 

On each of those form elements visible attribute I have something like this:

 

If(
 ThisItem.q_type = Text("4"),
 true,
 false
)

 

Changing the, ThisItem.q_type = Text("4"), bit depending o the type in the database.

 

I know this is probably hard to understand as I am terrible at explaining but I can answer any questions needed.

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @MrDannyHarry ,

    I can guide you on your basic question

    My issue is when i want to submit the answers to the form into a collection then into SQL I cannot define what form elements are active and what isn't.

    however I am not an SQL user, so I assume you can do the data writing part.

    I am assuming you set the Visibility of the various card based on logic. If you set a Variable to a value related, you can test this when doing the data submission.

    UpdateContext({vQType:"Dropdown"})

    and then writing

    If(
     vQType = "Dropdown",
     Whatever your Patch code for this . . .

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard