cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Joko
Level: Powered On

Converting the tutorial style slides into questions that submit to a form?

First of all, my apologies if this isn't worded the best. It would seem I am struggling on what to Google nevermind explain it

So I am making a daily checklist for our IT guys. The app I'd like to have just questions on a page. They click ok, it asks another question. Each page so to speak has a button that let's you report a fault.

At the end (say 5 questions) you can submit all the OKs and then any problems.

I have seen the tutorial theme and thought that would the a great idea in how it uses tables to show the navigation rather than using screens for each question. (This one is only 5 questions but I have others with 30 etc)

First of all, is this even possible within powerapps? I have looked all patching and collections and cant get it to copy the questions answer and move on to the next table/question.

Thanks
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Converting the tutorial style slides into questions that submit to a form?

Hi @Joko ,

Could you please share a bit more about your scenario?

Do you want to convert the tutorial style slides into questions, and submit all answers to questions to your data source?

 

Based on the needs that you mentioned, I think the Employee Engagement Survey template app could achieve your needs. Please check the following blog for more details:

https://www.sharepointsky.com/powerapps-employee-engagement-survey/

 

In addition, please also check and see if the following video would help in your scenario:

https://www.youtube.com/watch?v=RisTtTc9aOY

 

If you want to convert the tutorial style slides into questions, and submit all answers to questions to your data source, firstly, you need to save all questions and corresponding available answers within a data source just like below:

Table(           
 {Step: 0, Question:"Question1", AvailableOptions: ["1", "2", "3"] },           
 {Step: 1, Question:"Question2", AvailableOptions: ["1", "2", "3"]},           
 {Step: 2, Question:"Question3", AvailableOptions: ["1", "2", "3"]},           
 {Step: 3, Question:"Question4", AvailableOptions: ["1", "2", "3"]}
)

Add a Gallery (TutorialNavigator1) control, set the Items property to above Table value.

then within your app, add a Radio button control (Radio1) to list all available options for corresponding question. Set the Items property of the Radio button to following:

If(
IsBlank(_guideStep),
First(TutorialNavigator1.AllItems).AvailableOptions,
LookUp(TutorialNavigator1.AllItems, Step = _guideStep).AvailableOptions
)

set Layout property of the Radio button to following:

Layout.Horizontal

In order to collect the answers to each question within your app, please take a try with the following workaround:

Add the following formula within the OnSelect property of the ">" icon (right navigate) button:

Set(_guideStep, Min(_guideStep+1, Last(TutorialNavigator1.AllItems).Step));
Collect(
AnswersToQuestion,
{
QuestionName:If(IsBlank(_guideStep), First(TutorialNavigator1.AllItems).Question, LookUp(TutorialNavigator1.AllItems, Step = _guideStep).Question),
Answer: Radio1.Selected.Value
}
)

When reaching the last question, you could submit all answer to question records (AnswersToQuestion) into your data source via click "Submit" button. Set the OnSelect property of the "Submit" button to following:

Collect(
AnswersToQuestion,
{
QuestionName:If(IsBlank(_guideStep), First(TutorialNavigator1.AllItems).Question, LookUp(TutorialNavigator1.AllItems, Step = _guideStep).Question),
Answer: Radio1.Selected.Value
}
);
ForAll( AnswersToQuestion, Patch( 'YourDataSource', Defaults('YourDataSource'), { QuestionName: AnswersToQuestion[@QuestionName], Answer: AnswersToQuestion[@Answer] } ) )

Note: The QuestionName and Answer columns are both columns in your data source, which used to store the Question name value and Answer value.6.JPG

 

7.JPG

More details about ForAll function and Patch function, please check the following article:

ForAll function, Patch function

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Converting the tutorial style slides into questions that submit to a form?

@Joko 

Are you referring to the Employee Engagement Survey template, or just which one and where are you getting the template?  Sorry I'm not familiar with the "tutorial style slides".  So, I would love to hear more...

 

As for can you do it in PowerApps...absolutely!!  

 

As for your specific issues with the moving on to the next "screen".  Can you provide some formulas that you have on the buttons or other controls that you expect to cause your app to go to the next question.  That might provide some clues as to what problem you are having.

 

BTW: I assume this posting is a follow-on to your earlier posting.  Or is this a seperate question?

_____________________________________________________________________________________
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
Community Support Team
Community Support Team

Re: Converting the tutorial style slides into questions that submit to a form?

Hi @Joko ,

Could you please share a bit more about your scenario?

Do you want to convert the tutorial style slides into questions, and submit all answers to questions to your data source?

 

Based on the needs that you mentioned, I think the Employee Engagement Survey template app could achieve your needs. Please check the following blog for more details:

https://www.sharepointsky.com/powerapps-employee-engagement-survey/

 

In addition, please also check and see if the following video would help in your scenario:

https://www.youtube.com/watch?v=RisTtTc9aOY

 

If you want to convert the tutorial style slides into questions, and submit all answers to questions to your data source, firstly, you need to save all questions and corresponding available answers within a data source just like below:

Table(           
 {Step: 0, Question:"Question1", AvailableOptions: ["1", "2", "3"] },           
 {Step: 1, Question:"Question2", AvailableOptions: ["1", "2", "3"]},           
 {Step: 2, Question:"Question3", AvailableOptions: ["1", "2", "3"]},           
 {Step: 3, Question:"Question4", AvailableOptions: ["1", "2", "3"]}
)

Add a Gallery (TutorialNavigator1) control, set the Items property to above Table value.

then within your app, add a Radio button control (Radio1) to list all available options for corresponding question. Set the Items property of the Radio button to following:

If(
IsBlank(_guideStep),
First(TutorialNavigator1.AllItems).AvailableOptions,
LookUp(TutorialNavigator1.AllItems, Step = _guideStep).AvailableOptions
)

set Layout property of the Radio button to following:

Layout.Horizontal

In order to collect the answers to each question within your app, please take a try with the following workaround:

Add the following formula within the OnSelect property of the ">" icon (right navigate) button:

Set(_guideStep, Min(_guideStep+1, Last(TutorialNavigator1.AllItems).Step));
Collect(
AnswersToQuestion,
{
QuestionName:If(IsBlank(_guideStep), First(TutorialNavigator1.AllItems).Question, LookUp(TutorialNavigator1.AllItems, Step = _guideStep).Question),
Answer: Radio1.Selected.Value
}
)

When reaching the last question, you could submit all answer to question records (AnswersToQuestion) into your data source via click "Submit" button. Set the OnSelect property of the "Submit" button to following:

Collect(
AnswersToQuestion,
{
QuestionName:If(IsBlank(_guideStep), First(TutorialNavigator1.AllItems).Question, LookUp(TutorialNavigator1.AllItems, Step = _guideStep).Question),
Answer: Radio1.Selected.Value
}
);
ForAll( AnswersToQuestion, Patch( 'YourDataSource', Defaults('YourDataSource'), { QuestionName: AnswersToQuestion[@QuestionName], Answer: AnswersToQuestion[@Answer] } ) )

Note: The QuestionName and Answer columns are both columns in your data source, which used to store the Question name value and Answer value.6.JPG

 

7.JPG

More details about ForAll function and Patch function, please check the following article:

ForAll function, Patch function

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Joko
Level: Powered On

Re: Converting the tutorial style slides into questions that submit to a form?

This is awesome!


Thank you very much for your detailed reply! 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 181 members 5,120 guests
Recent signins:
Please welcome our newest community members: