cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

how to get 'n' answers from the user and save in sharepoint

Hi all, i hope someone can help me.
Im developing an application with different fields such as project name, project area and project risks,
the problem is that I don't know how to save the risks, this has 2 fields, name of the risk and consequences of the risk,
so I need to have these 2 fields for the user to fill in and put a button to add a new risk if it is necessary

 

example of what i want to do :

(all this is filled by the user)

name of project: Project 1

area of project: Mantainment area

Risks

Risks

Consequences

Risk 1

Consequence 1

Risk 2

Consequence 2

                                   (button)Add a new risk

 

and save it in a sharepoint list

 

but I do not know how to do it, and I do not find how to store it in sharepoint, will it be necessary to make 2 lists?
one for all project data and one for risks only
sorry for my gramaticals errors i use google translator

I'm new in this community I don't know if I break any rules or post in the wrong forum.

thanks

 

 

 

 

 

 

 

 

4 REPLIES 4
Highlighted
Super User
Super User

Re: how to get 'n' answers from the user and save in sharepoint

@juan_urena 

You are definitely in the correct forum.  Welcome to the PowerApps community!

 

Let's start with building  your Sharepoint List.  Make sure you have the following columns and they are Text data type.

 

Risk1, Consquences1,
Risk2, Consquences2,
Risk3, Consquences3,
Risk4, Consquences4,
Risk5, Consquences5,
Risk6, Consquences6,
Risk7, Consquences7,
Risk8, Consquences8,
Risk9, Consquences9,
Risk10, Consquences10

 

Now open PowerApps.  Put this code in the OnStart property of your app

 

Set(showLines,2);

Next, create an Edit form based on your Sharepoint datasource.  Input the following code in the Visible control for each DataCard.

 

Risk1, Consquences1:  If(showLines>=1,true,false) 
Risk2, Consquences2:  If(showLines>=2,true,false) 
Risk3, Consquences3:  If(showLines>=3,true,false) 
Risk4, Consquences4:  If(showLines>=4,true,false) 
Risk5, Consquences5:  If(showLines>=5,true,false) 
Risk6, Consquences6:  If(showLines>=6,true,false) 
Risk7, Consquences7:  If(showLines>=7,true,false) 
Risk8, Consquences8:  If(showLines>=8,true,false) 
Risk9, Consquences9:  If(showLines>=9,true,false) 
Risk10, Consquences10:  If(showLines>=10,true,false) 

 

Finally put this code in the button for "Add A New Risk" within the OnSelect property

 

Set(showLines,showLines+1)

 

Test by clicking the button.  Additional rows will appear with each click.  Please let me know if you have any questions.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Highlighted
Helper I
Helper I

Re: how to get 'n' answers from the user and save in sharepoint

hi so much thanks for the quickly answer,i guess that  I was wrong to express what i need to do sorry , i find that what i need is use collections but i dont know how to save a collection in a column from sharepoint it is posible or i need to do other table to save risk and consecuences?

Highlighted
Super User
Super User

Re: how to get 'n' answers from the user and save in sharepoint

@juan_urena 

To save a form input into a single column you will need to know the PATCH statements.  Suggest you take a few minutes watch this video.  It will teach you everything you need to know https://www.youtube.com/watch?v=gX5q_V3U8-s.

Highlighted
Helper I
Helper I

Re: how to get 'n' answers from the user and save in sharepoint

thanks!! i will see in a moment 

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!

Top Solution Authors
Top Kudoed Authors
Users online (7,424)