cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

How to add new questions?

Hi, so I choosed to work with the pre-built "Employee engagement survey" and connected the app with an Excel-table on my dropbox, worked good. 

 

Now I want to add another question so I created a new question in powerapps and added the question to the Excel table along with the Responses. I am sure Ill need to do some coding here on the last button to collect the new answers into the Excel table but I dont know how. Ill add some screenshots of the app and the Excel table. Thousands of thanks for any answer!

 

Lol1.PNGlol2.PNGlol3.PNGlol4.PNG

6 REPLIES 6
Highlighted
Super User
Super User

Re: How to add new questions?

@Anonymous 

Please see where we left off on this in your other thread.

Your issue is with the type of datasource you are using.  
Please supply a screenshot of your datasource list.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Anonymous
Not applicable

Re: How to add new questions?

Hi Randy,

 

Didnt see that you answered on the old one sorry. Ill insert a screenshot of my data source here. Thanks!

 

datasource.PNG

Highlighted
Super User
Super User

Re: How to add new questions?

@Anonymous 

Very good...thanks for the picture.  I wanted to make sure first off that you were not dealing with the Excel import issue as before.

So, now, what you are doing is adding a whole new question to that Template App.  

That app was hard-designed for the 5 questions that it has - thus there are 5 question screens in the app.

If you want to use that app and add another question, then you will need to create another screen as well.  You might want to simply duplicate one of the question screens you have and then adjust the formulas in that screen to pick up your new question and choices.  I would also move the submit logic from the question 5 button into your new screen (if it's the last question).

That will give you what you want.  From what I see, yur datasource is good now and the PowerApp is working with new items you add to it.  You just need to create the screens to go with it.

 

Hope that sheds some more light on it for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Anonymous
Not applicable

Re: How to add new questions?

Ty! I duplicated question 4 so now its 6 questions, however, the new question can be seen in the app now when I try it but the answers isnt collected in the Excelsheet 😆

Highlighted
Anonymous
Not applicable

Re: How to add new questions?

If(!IsBlank(LookUp(Responses, Username = User().FullName).Username),UpdateIf(Responses,Username=User().FullName,{ResponseId:ResponseId, Answer1:Radio1.Selected.OptionText,Answer2:Replace(Concat(Listcollect,OptionText & ", "),Len(Concat(Listcollect,OptionText & ", "))-1,1," "),Answer3:Text(Slider1.Value), Answer4:If(Radio1_1.Selected.OptionText="No","No," & TextInput1.Text,Radio1_1.Selected.OptionText),Answer5:TextInput1_1.Text,Username:User().FullName}),
UpdateContext({NewSurvey:Patch(Responses,Defaults(Responses), {ResponseId:Text(CountRows(Responses)+1), Answer1:Radio1.Selected.OptionText,Answer2:Replace(Concat(Listcollect,OptionText & ", "),Len(Concat(Listcollect,OptionText & ", "))-1,1," "),Answer3:Text(Slider1.Value), Answer4:If(Radio1_1.Selected.OptionText="No","No," & TextInput1.Text,Radio1_1.Selected.OptionText),Answer5:TextInput1_1.Text,Username:User().FullName})}));Navigate(Finish_Screen,ScreenTransition.Fade)

We have 6 questions now, should I add something here? Even though I duplicated one of the questions, it doesnt seem to add this question to the Excel-sheet?

@RandyHayes 

Highlighted
Super User
Super User

Re: How to add new questions?

@Anonymous 

Yes, you will need to alter that formula to include your new question.

Not sure what kind of controls you might have on your new screen, but if it is a duplicate of Question 4, then you will need to add the update information for question6.  Follow the syntax of the Answer4 in your formula and add the field for Question 6 just like it except changing the names of the controls to be what you have on your new screen.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,440)