cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Emmanuel_A
Frequent Visitor

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

Re: Need some help on Powerapps with sharepoint list

Hi @Emmanuel_A ,

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

Re: Need some help on Powerapps with sharepoint list

Hi @Emmanuel_A ,

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

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,628)