cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Trying to build a survy in powerapps. How to automate it, and not build a new page for every single question?

Hello!

I want to build a simple app for my company to manage and audit our carpool.I store all the data into different sharepointlists depending on the location of each carpool.A central part of the app is a survey/audit with ~80 questions. The logic I am using now is to store the questions/answers into 3 columns each. The first 10 columns of each row is for the car and all its details. Column 11 is the question as title of the column, and if the question is relevant for this car (Yes/No). Number 12 shows if questioned topic is insufficient for this car/row (YES/NO). Column 13 has a text that can be freely added if the answer needs some explanation. Number 14 will repeat the circle with the next question.

 

Here comes my question.

Is it possible to make a 'smart' survey? Can I generate a main page that will automatically show the first question in the selected row (gallery.selected) that's relevant (Yes), answer it, save the information back into the sharepointlist and continue with the next question (example: from column 11,12,13 to 14,15,16). This needs to be looped until there is no relevant question is left. After that, I want to jump to an other screen.Maybe you can hint me towards the right way, before I build 80 pages for all the questions..

 

Thank you so much for every reply and help!

 

here's a screenshot of my survey 'mainscreen' so you have something to look at :). 

 

Question 1.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Suni ,

Unfortunately you cannot use variables to refer to controls or commands, however you can use If statements and variables to control things like control visibility, display mode (edit/view/disabled) and general navigation. 

There are also a myriad of ways you can trigger these changes including buttons/icons and changes in the control values.

It is a matter of deciding what you need to do after each user interaction and presenting the user with the screen or contol/s required.

 

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.

View solution in original post

4 REPLIES 4
Super User III
Super User III

Hi @Suni ,

The answer is yes on a canvas app with a lot of If statements controlling the navigation etc.

I am not sure where you question leads from here as I do not know your stage in the PowerApps journey.

Happy to discuss further if you have any examples of what you have specifically in mind.

Hi @WarrenBelz,

thank you for your reply! 

 

I started using PowerApps like 2 weeks ago. I am learning on my way, so I never had a guide for it. 

My goal is to build a smart survey that will only show the questions that are marked with relevant. 

I changed the look of my survey page today to make it work a little bit better.  I have 3 main 'items' on it. I used a Form with the selected galleryitem to show and edit the 3 columns per question. First is the Question itself and tied to it, a checkbox if the question is relevant at all (yes/no switch) (as example, the first question for the car in row 6 starts in column 10). Next is a checkbox to note if there is a defect (yes/no switch) (row 6, column 11). Last is a text field to write in, so I can note the exact defect and additional information. 

After filling all the needed informations, I can press on "continue" to jump to the next screen with question 2. The Columns for that are: Question(6/13), defect (6/14), text (6/15). This goes on until I have no more questions to ask. At the moment, I have to build a screen for every single question. 

Is it possible to build a logic "on select" action to change the way the screen work? For example, I am using ThisItem.'1. Question'  for the first Form part. This will give me row6 column 10 and show the title as a text which contains the question 1. Is it possible to change this up to something like ThisItem.Column10+X and defince X as a variable? Instead of moving to the next page, I could simply add +3 to X each time I click on continue. I could jump from row 6/column 10 to row 6/colum 13 for the next question and change the form to the new question.

The "jump over sides with relevant=no" is just a simple addition after that.

Hi @Suni ,

Unfortunately you cannot use variables to refer to controls or commands, however you can use If statements and variables to control things like control visibility, display mode (edit/view/disabled) and general navigation. 

There are also a myriad of ways you can trigger these changes including buttons/icons and changes in the control values.

It is a matter of deciding what you need to do after each user interaction and presenting the user with the screen or contol/s required.

 

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.

View solution in original post

Hi @Suni,

It sounds like you want to make a questionnaire app that can scale out any number of questions of any number of types.

 

I do not have a tutorial on it, but I do have a sample app that you can see with the If statements that @WarrenBelz is mentioning. You can also see a spreadsheet of the way I set up my tables.

 

Some notes:

  • You have a table of every question.
  • You filter the table to show only questions to a given survey/questionnaire/quiz.
  • In the gallery's template, you include controls for all the different question types you expect: multiple choice, single selection, text, etc.
  • You change the visibility of each control to only appear if the question type expects it.

 

Sample app: https://powerusers.microsoft.com/t5/Community-App-Samples/Design-Patterns-from-Mr-Dang-Part-2/td-p/1...

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (81,262)