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

Need some help on Powerapps with sharepoint list

Hello, i need a little help on powerapps.

 

I need to make an app that is based on some sharepoint list. The app is supposed to get a question, take the specific 4 answer of this question and then store the selected answer in an other sharepoint list.

 

So i got a question sharepoint list,  i have another sharepoint list with 4 answer per question so i got a lookup assigned to the question it refers to. And i need to store only the selected answer by the user in a third sharepoint list.

And i have 2 majors problem i'm a power apps begginner and i don't know how to make the choice between the 4 answer (i can not use the "choice" field of sharepoint) so every answer is an item of a sharepoint list linked to the question by a lookup column.

And secondly i don't know how to store the selected item in another list with powerapps.

If anyone got a solution i'm pretty sure its not that hard but i tried by myself and i failed so if anyone got an idea 🙂

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that :

1) question sharepoint list: one question field (text type)

2)answer list:  four answer field(text type), related question field(lookup field)

choose answer for every question and save the selected item to another list (selected answer list)?

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

1)create three lists

question list: question field(text type)

answer list: related question field(lookup field) A1,A2,A3,A4fields(text type)

selectedanswer list: question field(lookup field--to question list), answer field(text type)

2)in powerapps

insert a gallery, set its Items: Answer

insert a label and four check boxes inside the gallery

set the label's Text:

ThisItem.relatedquestion.Value

set checkbox1's Text:

ThisItem.A1

set checkbox1's OnCheck:

Set(var,A1);Reset(Checkbox2);Reset(Checkbox3);Reset(Checkbox4)

set checkbox2's Text:

 

ThisItem.A2

 

set checkbox2's OnCheck:

 

Set(var,A2);Reset(Checkbox1);Reset(Checkbox3);Reset(Checkbox4)

 

set checkbox3's Text:

 

ThisItem.A3

 

set checkbo31's OnCheck:

 

Set(var,A3);Reset(Checkbox1);Reset(Checkbox2);Reset(Checkbox4)

 

set checkbox4's Text:

 

ThisItem.A4

 

set checkbox4's OnCheck:

 

Set(var,A4);Reset(Checkbox1);Reset(Checkbox2);Reset(Checkbox3)

 

set the arrow button's OnSelect:

If(IsEmpty(Filter(selectedanswer,question.Value=ThisItem.relatedquestion.Value)),Patch(selectedanswer,Defaults(selectedanswer),{question:ThisItem.relatedquestion,answer:var}),Patch(selectedanswer,LookUp(selectedanswer,question.Value=ThisItem.relatedquestion.Value),{answer:var}))

1231.PNG

 

1232.PNG

 

1233.PNG

 

1234.PNG

 

Then after you choose answer click the arrow button.If the question has answer already, you will update answer.If the question has no answer, you will create answer.

 

 

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

1 REPLY 1
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that :

1) question sharepoint list: one question field (text type)

2)answer list:  four answer field(text type), related question field(lookup field)

choose answer for every question and save the selected item to another list (selected answer list)?

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

1)create three lists

question list: question field(text type)

answer list: related question field(lookup field) A1,A2,A3,A4fields(text type)

selectedanswer list: question field(lookup field--to question list), answer field(text type)

2)in powerapps

insert a gallery, set its Items: Answer

insert a label and four check boxes inside the gallery

set the label's Text:

ThisItem.relatedquestion.Value

set checkbox1's Text:

ThisItem.A1

set checkbox1's OnCheck:

Set(var,A1);Reset(Checkbox2);Reset(Checkbox3);Reset(Checkbox4)

set checkbox2's Text:

 

ThisItem.A2

 

set checkbox2's OnCheck:

 

Set(var,A2);Reset(Checkbox1);Reset(Checkbox3);Reset(Checkbox4)

 

set checkbox3's Text:

 

ThisItem.A3

 

set checkbo31's OnCheck:

 

Set(var,A3);Reset(Checkbox1);Reset(Checkbox2);Reset(Checkbox4)

 

set checkbox4's Text:

 

ThisItem.A4

 

set checkbox4's OnCheck:

 

Set(var,A4);Reset(Checkbox1);Reset(Checkbox2);Reset(Checkbox3)

 

set the arrow button's OnSelect:

If(IsEmpty(Filter(selectedanswer,question.Value=ThisItem.relatedquestion.Value)),Patch(selectedanswer,Defaults(selectedanswer),{question:ThisItem.relatedquestion,answer:var}),Patch(selectedanswer,LookUp(selectedanswer,question.Value=ThisItem.relatedquestion.Value),{answer:var}))

1231.PNG

 

1232.PNG

 

1233.PNG

 

1234.PNG

 

Then after you choose answer click the arrow button.If the question has answer already, you will update answer.If the question has no answer, you will create answer.

 

 

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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,082)