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

Connecting to sharepoint, after the app is made in powerapps?

Dear powerusers,

Last week i went to a powerapps course organised by Macaw, at the course i had to make a test environment.
After the course i started working on the app that my company was looking for, but i forgot to leave the test environment.
Now that i have created the app, i want it to be able to output it's data to sharepoint.
My company loves sharepoint and the office 365 environment, so now i have to make a connection to sharepoint from the canvas app i have made with powerapps.
Can anyone help me how this works? because i have no clue, and there aren't alot of guides on youtube i can find.
The videos i found were based on a sharepoint list, but now i have to do it the other way around.
Also i'm kind of new to the office 365 environment, besides word ofcourse....
You would be of great help!
So i have this canvas app made in powerapps, but now the data that get's collected in powerapps has to get stored to a sharepoint list.
Thanks again for reading my struggles.

Danny Engels.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Connecting to sharepoint, after the app is made in powerapps?

@DannyEngels 

So, I would first try to digest that formula and understand what it is doing.  Refer to the documentation on each function in that formula and learn what each does.  Then follow that up with any videos you find online that would explain those functions better for you.  Once you have that in hand more, then hit the templates and also create a few simple apps - even try to duplicate apps you see on videos.  All great learning experiences.  You will need to really get some of that down before you venture in to this. You would really need to bolster some of your knowledge of this beforehand. While a call to review it would be good, it would only be helpful if you were already at a certain point in your app and needed some review.  Certainly can help with some of that, but you need to get up to speed on some of the basics first.

_____________________________________________________________________________________
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.

View solution in original post

10 REPLIES 10
Super User
Super User

Re: Connecting to sharepoint, after the app is made in powerapps?

@DannyEngels 

You're going to need to go into your DataSources in your App and add a datasource to the SharePoint list you are attempting to work with.  You can go to View->Data sources and then in the DataSource pane, "Add data source".

If you haven't made a connection to SharePoint, you will want to first choose that and create a connection, then you will go to the site and list that you want.

After that, you will have a datasource by whatever name the list is.  That is what you would then substitute into all of your formulas, forms, etc. 

 

I hope that helps you get started.

_____________________________________________________________________________________
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.
DannyEngels
Level: Powered On

Re: Connecting to sharepoint, after the app is made in powerapps?

@RandyHayes 
Sharepoint integration.pngSharepoint IntegrationThanks for your reply/help, i have made the sharepoint connection.

Now my second question is, that i have an audit testing app already created and ready to be tested by the production department.
The thing is they have to choose between 5 options in all 7 questions, above is an example of one of the 7 questions.

They have to choose one option from the audit list (as seen above) and then confirm it with the green button, or make a remark/photo with the grey button.

 

My core question is, how do i input this into sharepoint if the lead operators choose one of the five options(e.g. click the green button) from the 7 questions?
Do i still have to create the sharepoint list? or does sharepoint update when the green button is clicked?

 

Final question, what is the formula that i type into powerapps to make the data get stored to the sharepoint list?

Thanks again for you help (by the way the language you're reading in the powerapp screenshot is dutch).

Danny Engels.

Super User
Super User

Re: Connecting to sharepoint, after the app is made in powerapps?

@DannyEngels 

What happens to the information collected is going to depend on how you are handling it in your App.  SharePoint will only get updated if you update it.  There is no connection beyond that.

You would want to look at the formulas you have on the question response buttons to see where you are putting the answers.  Possibily you are recording them in a collection and then patching them to SharePoint at some point later? Or perhaps you are patching them at the time they answer.  That would all depend on how you have the formulas on your buttons.

_____________________________________________________________________________________
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.
DannyEngels
Level: Powered On

Re: Connecting to sharepoint, after the app is made in powerapps?

@RandyHayes 
My intention is to patch the answers given in the powerapp directly to the sharepoint list.
Sorry for my maybe obvious questions, but im still learning powerapps because i'm an student, and i'm at this company for my internship.
There is one poweruser in the holding section of this company, but he's very busy with all the 26 locations this company has.

how would the formula look like that i have to wire to the green button?

Thanks again for your help/patience

Danny Engels.

Super User
Super User

Re: Connecting to sharepoint, after the app is made in powerapps?

@DannyEngels 

So, there is no clear-cut "here's the formula" to this.  I am not sure if this is a new app you are designing, or if you are taking this over from someone else.  If taking over, then you need to look at the OnSelect actions of the buttons (to start) to see what is going on in them.

If you are designing this and are stuck at this point, then you need to make some design decisions:

1) Will you be "collecting" all the answers and then updating your SharePoint list at some point after the questions are answered?  Or will you be submitting each answer as they are selected.

2) What will your SharePoint list data structure look like?  One record with multiple question responses?  Multiple records, one for each answer?  Or...other?

3) Where does your list of questions come from now?  Are you "hard-coding" into your app, or are you getting them from a DataSource?  And...what is the data connection (logically, not what is the data source)?

 

Not knowing the above answers might only serve to confuse you even more if I was to provide some examples - which I'd be happy to do.

_____________________________________________________________________________________
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.
DannyEngels
Level: Powered On

Re: Connecting to sharepoint, after the app is made in powerapps?

@RandyHayes 

Thanks for the response,

 

1) The answers have to be submitted direcly to the sharepoint list, because we're just starting the tests in our production environment, and we have to make it as easy as possible for the people on the production department.

 

2) When the operator(s)/lead operators are choosing between one of the 5 questions, of the 7 main questions. 
There still has to be an option to leave a remark/picture (The grey button) of the production floor if there are some situations that are not acceptable/dangerous.OnSelect.pngThis is how far i came with tryingAuditDraft6S.png 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

But the 7 questions are leading.
There is a draft some other students made for me to take the project over (Picture 2).

 

3) i was "hard-coding" them into my powerapp, because i first made the app in a test environment, and transferred it to the production environtment later. but the sharepoint list should look something like picture 2 to make it atleast functional.
In picture 1 you can see the data connections i have made.

Hope this information is enough, i tried my best to explain it as clearly as possible.

Thanks again,

Danny Engels.

 

 

Super User
Super User

Re: Connecting to sharepoint, after the app is made in powerapps?

@DannyEngels 

So, since this appears then to be one single SharePoint record you are creating, as each question has it's own column in the SharePoint list, then you will want to collect the results of each question and then at the end issue a Patch statement to create/update the SharePoint list.

Not sure if each round of questions represents a new record, or if you need the ability to edit/modify records.  If so, then the challenge there will be getting the proper record to modify.

If not, then it's fairly easy.  On each question on the buttons, patch a local collection with the answer and then at the last question, issue a patch to the SharePoint list.

You might want to take a look at the Survey Template in power apps (listed at the Employee Engagement Survey).  In there you will see this exact method where each question is collected and then at the end it is patched to the datasource.  In the template, it's Excel, but you would just change yours arund to be SharePoint instead.

There will be more complexities if your questions are Choice columns in your SharePoint, but take a look at the template first and then post back when/if you get stuck on the choice column patching.

_____________________________________________________________________________________
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.
DannyEngels
Level: Powered On

Re: Connecting to sharepoint, after the app is made in powerapps?

@RandyHayes 

Thanks alot for the response again, but i can't get my head around those formulas that are shown i that Employee Engagement Survey.

If this is the right one:

Collect(Responsecollect,{QuestionId:1,ResponseId:CountRows(Responsecollect)+1,Response:Radio1.Selected.OptionText});
If(CountRows(Listcollect)>=1,Collect(Responsecollect,{QuestionId:2,ResponseId:CountRows(Responses)+1,Response:Text(Last(FirstN(Listcollect,1)).OptionText)}));
If(CountRows(Listcollect)>=2,Collect(Responsecollect,{QuestionId:2,ResponseId:CountRows(Responses)+1,Response:Text(Last(FirstN(Listcollect,2)).OptionText)}));
If(CountRows(Listcollect)>=3,Collect(Responsecollect,{QuestionId:2,ResponseId:CountRows(Responses)+1,Response:Text(Last(FirstN(Listcollect,3)).OptionText)}));
If(CountRows(Listcollect)>=4,Collect(Responsecollect,{QuestionId:2,ResponseId:CountRows(Responses)+1,Response:Text(Last(FirstN(Listcollect,4)).OptionText)}));
If(CountRows(Listcollect)>=5,Collect(Responsecollect,{QuestionId:2,ResponseId:CountRows(Responses)+1,Response:Text(Last(FirstN(Listcollect,5)).OptionText)}));
If(CountRows(Listcollect)>=6,Collect(Responsecollect,{QuestionId:2,ResponseId:CountRows(Responses)+1,Response:Text(Last(FirstN(Listcollect,6)).OptionText)}));
If(CountRows(Listcollect)>=7,Collect(Responsecollect,{QuestionId:2,ResponseId:CountRows(Responses)+1,Response:Text(Last(FirstN(Listcollect,7)).OptionText)}));
Collect(Responsecollect,{QuestionId:3,ResponseId:CountRows(Responsecollect)+1,Response:Text(Slider1.Value)});
Collect(Responsecollect,{QuestionId:4,ResponseId:CountRows(Responsecollect)+1,Response:If(Radio1_1.Selected.OptionText="No",TextInput1.Text,Radio1_1.Selected.OptionText)});
If(!IsBlank(TextInput1_1.Text), Collect(Responsecollect,{QuestionId:5,ResponseId:CountRows(Responsecollect)+1,Response:TextInput1_1.Text}));
Navigate(Finish_Screen, ScreenTransition.Fade,{ans5:TextInput1_1.Text})


That is still a bit complex for me haha, i have tried most of the things you told me to do, and i've searched online about the things you told me but i'm still stuck, sorry...

I got a tip from someone i know, but i'm not sure if you're willing to make time out of your day to help me.
She told me that maybe we could make a skype call or something like that, so i can clearly explain what i need to get done. 

That would be great if that's possible! the only problem may be that we're in different time zones probably.
I'll hear from you if you're willing to explain it to me, either on a call or here on the forum's, but i can't thank you enough already!!

Danny Engels.

Super User
Super User

Re: Connecting to sharepoint, after the app is made in powerapps?

@DannyEngels 

So, I would first try to digest that formula and understand what it is doing.  Refer to the documentation on each function in that formula and learn what each does.  Then follow that up with any videos you find online that would explain those functions better for you.  Once you have that in hand more, then hit the templates and also create a few simple apps - even try to duplicate apps you see on videos.  All great learning experiences.  You will need to really get some of that down before you venture in to this. You would really need to bolster some of your knowledge of this beforehand. While a call to review it would be good, it would only be helpful if you were already at a certain point in your app and needed some review.  Certainly can help with some of that, but you need to get up to speed on some of the basics first.

_____________________________________________________________________________________
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.

View solution in original post

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: 153 members 5,148 guests
Please welcome our newest community members: