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

Extra screen if an answer matches condition

Hi Community,

 

Wasn't sure about the subject but what I need is:

I have a PowerApp to do an audit, each question has 4 answers: 10, 8, 4 and 2. So far it works and answers are being stored in a SP List.

After the audit is being submitted, I'd like to check all the answers and if any of the answers is 4 or 2, I'd like a screen to be displayed to the user to raise a Correction Action Report and it will be stored in a different SP List.

 

So, I have an audit with 20 questions, 3 questions were answered "2" so after submitting the audit, then, the user gets immediately a screen to create a Correction Action Report, then sends it and gets another screen because 3 questions require raising Correction Action Report.

 

Thank you for any suggestions.

 

Slawek

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Extra screen if an answer matches condition

Hi @TheSlawekG ,

Do you want to check the answer choice, if the choice is "2" or "4", this question will be saved in another list and you will be navigate to another screen?

If so, I've made a similar test for your reference:

I use 6 questions as example. (use 6 radios)

set the submit button's OnSelect:

ClearCollect(answer,{Q:Q1,value:Radio1.Selected.Value},{Q:Q2,value:Radio2.Selected.Value},{Q:Q3,value:Radio3.Selected.Value},{Q:Q4,value:Radio4.Selected.Value},{Q:Q5,value:Radio5.Selected.Value},{Q:Q6,value:Radio6.Selected.Value});
If((Radio1.Selected.Value=2||Radio1.Selected.Value=4)||
   (Radio2.Selected.Value=2||Radio2.Selected.Value=4)||
   (Radio3.Selected.Value=2||Radio3.Selected.Value=4)||
   (Radio4.Selected.Value=2||Radio4.Selected.Value=4)||
   (Radio5.Selected.Value=2||Radio5.Selected.Value=4)||
   (Radio6.Selected.Value=2||Radio6.Selected.Value=4)||,
Collect(list2,Filter(answer,value=2||value=4));Navigate(report screen,None),
Collect(list1,Filter(answer,value=8||value=10))
   )

//in this way, if there's answer 2 or 4, you will navigate to the report screen and the questions with answer 2 or 4 will be updated to lis2, others will be updated to list1.

I assume that column names are Q and value in list1 and list2. So I use the collection to update directly.

If list1 and list2 have the same field names for question data and answer data, please replace the collection field names with the names that you use.

If list1 and list2 do not have the same field names for question data and answer data, please use RenameColumns()function to shape the table.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Extra screen if an answer matches condition

Hi @TheSlawekG ,

Do you want to check the answer choice, if the choice is "2" or "4", this question will be saved in another list and you will be navigate to another screen?

If so, I've made a similar test for your reference:

I use 6 questions as example. (use 6 radios)

set the submit button's OnSelect:

ClearCollect(answer,{Q:Q1,value:Radio1.Selected.Value},{Q:Q2,value:Radio2.Selected.Value},{Q:Q3,value:Radio3.Selected.Value},{Q:Q4,value:Radio4.Selected.Value},{Q:Q5,value:Radio5.Selected.Value},{Q:Q6,value:Radio6.Selected.Value});
If((Radio1.Selected.Value=2||Radio1.Selected.Value=4)||
   (Radio2.Selected.Value=2||Radio2.Selected.Value=4)||
   (Radio3.Selected.Value=2||Radio3.Selected.Value=4)||
   (Radio4.Selected.Value=2||Radio4.Selected.Value=4)||
   (Radio5.Selected.Value=2||Radio5.Selected.Value=4)||
   (Radio6.Selected.Value=2||Radio6.Selected.Value=4)||,
Collect(list2,Filter(answer,value=2||value=4));Navigate(report screen,None),
Collect(list1,Filter(answer,value=8||value=10))
   )

//in this way, if there's answer 2 or 4, you will navigate to the report screen and the questions with answer 2 or 4 will be updated to lis2, others will be updated to list1.

I assume that column names are Q and value in list1 and list2. So I use the collection to update directly.

If list1 and list2 have the same field names for question data and answer data, please replace the collection field names with the names that you use.

If list1 and list2 do not have the same field names for question data and answer data, please use RenameColumns()function to shape the table.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

TheSlawekG
Level: Powered On

Re: Extra screen if an answer matches condition

Hi @v-yutliu-msft 

 

Thank you for your help. Let me present my entire project as it is far beyond what I've done with PowerApps so far. So far, I only created apps stored data into one SP List without crossreferences what I'd like to have here.

 

I have a SP List "Audit Test":

audit01.PNG

audit02.PNG

 

 My second list is "Corrective Action Reports":

audit03.PNG

audit04.PNG

 My PowerApp is like:

audit05.PNG

Currently, there are only 2 questions but finally will be like around 50; my first idea was to use a different screen for each question but this may change.

Returning to my original question:

Design Internal Audit will be stored in "Audit Test" SP List and this works now.

 

When someone selects 4 or 0 a new Corrective Action Report needs to be created:

audit06.PNG

The fields are:

audit04.PNG

CAR Number is ID;

CAR Source is where is the CAR raised from (in the future will be more audits but for now, it would be "Audit Test" (name of the list);

CAR Owner selectable;

CAR Date current date;

CAR Due Date current + 1 month;

CAR Description - obvious;

The screen:

audit07.PNG

I am open to ideas because I am not sure how to solve this;

One idea is (if possible) when 4 or 0 is selected then these fields from the above screen will appear under the current question in the audit and everything will be sent to the correct list.

The second idea is that after all questions will be filled and the user sends the audit it will check what questions were selected 0 or 4 and as many screens will appear as many questions were selected 0 or 4, of course, each screen will include the question name and then those fields from the screen audit07.PNG

I'm missing one thing here, I think that after each question I need a column with the ID of a CAR that is relevant to the question:

audit08.PNG

 

Hopefully, someone could help with this or direct me to perhaps working example.

I am also opened to other suggestions as this is new for me and not even sure if my approach is correct and achievable.

 

Thank you.

 

Slawek

 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,367)