PowerApps Bulk Save to SharePoint List Demo

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back in this video you will learn how to save data in bulk to sharepoint list using powerapps collection so stay tuned and let's go to the demo after this short intro you can use a collection to store data that users can manage in their power app a collection is a group of items that are similar such as products in a product list in this example i will create a blank canvas app i will then create a form which will be used to collect data on button click the form data will be added to a collection i will then implement the bulk operation on all the records in a collection and save them to a sharepoint list so let's see this in action i am on one of the sharepoint site in my office 365 environment i have a list called products list have three attributes first one is the title of the product the second one is color and the third one is order date which is a date type and this color column is actually choice field so if i go and look at in the edit you can see the choices are blue green and yellow and you can add other choices as you want you cancel on that so using the powerapps collection i want to bulk load data into this product list in sharepoint so if i go back to office 365 landing page from the left hand menu i need to look for powerapps application icon so i will click on that this will open the powerapps application landing page where you can create new apps now to create a new app from the left hand menu i need to click on this create link now this is giving me three ways to make an app i can create a canvas app a model driven app or a portal from blank so in my scenario i will be creating a canvas app so i will select the canvas app from blank now i need to provide this app a name i will just call it products app and the format i will leave is as a tablet format once i'm happy with the name and the format i will click on create this will create a blank canvas app for me to work on so the blank canvas app is created so the first thing i need to do is i need to add some input boxes to capture the information for this product list so here we have title color and date so the title is single line text column and this is the drop down choice column and this is the date type column so if i go back to my power app first i will insert some labels so from the insert tab i need to click on label that will add a label i will click twice again to add other labels now i have three labels i will rearrange them and rename them so i have renamed labels to title color and order date now the next thing is i need to add some input boxes so i can capture the information to do that again i will go to insert tab and under input i can create a text box which i want there that's there and then i need to create a drop down because we want to drop down for the color and then also i need the date picker column for the order date i will just arrange them on the form by default this color is showing as drop down one so we need to put the values which are needed for this shape on list so if i go to this column color column and click on edit the choices are blue green and yellow so if i come back on the power app i select that color and the items i will just replace this with the table so i created a data type table with these brackets and then i added the values which i want in the drop down now if i play this i can see the drop down have the blue green and yellow value for the color so we got the form to input all the information now we need to add a button so when someone click on the button it creates a collection if it doesn't already exist or if it exists it appends the values from this form to the collection so to do that i need to go to insert tab and click on a button let me rearrange the button put it somewhere here i will rename the button text add to collection so now we have the form and a button ready the next bit we need to do is when someone click on this button we want to add this information to a collection so if i select a button by default on select is false okay so instead of false we can say collect and then what is the name of the collection i want to use here so i will say product collection yeah so i'll call it product collection and now it's asking me what records i want to append in this collection so i can put these brackets and then inside the brackets i can actually create the collection columns and add these text to that that column before we do that let's rename this one so this text input 1 let's rename it to title text and this color drop down let's rename it to color dd and let's rename this date picker one to order date picker now if i come back to this button so what we did so far is we were saying that we want to create a collection and the name of the collection and then what we want to put inside the collection so the first column inside the collection i will say collection title and what i want to append from here to this column of collection so we want to append this title column which is title text so i'll say title text dot text and let's close this one so at the moment we have created one column in the collection and we are adding this information in that column in the collection now let's add other two columns in there so i will do comma i will call the second column call underscore color and the value is going to be the color dd value so because this is a drop down so i will use color dd dot selected so you can't use selected text because it needs to be object when we pass this information to a sharepoint list so you will have to use selected for the drop down value and the third one is the order date so for that i will say call underscore or the date and the value will be order date picker dot selected date let me click on this drop arrow here and if i click on format text this is going to format the text now we can clearly see that we have a collect method inside the cloud we naming our collection as product collection and then we are adding attribute to that product collection as title color and order date and we are pulling the values from this form and appending it to the columns inside the collection every time you click on a button whatever information is in this text box is drop down or date picker will be added to the collection so to see the collection if i go to this data tab from the left menu i can see there is a collection already created which is the product collection you can also go to the file tab and go to collections and you will see the product collection here we haven't added any data in there that's why it is appearing as empty go back the next thing is we probably need to clear collection at some point so we need to add another button which is clear collection so under insert tab i will click on button again now let me put this button on this inside i will rename this button to clear collection and let me just resize it and on a click of this button what i want to do is i want to just clear collection so the simple method is clear and then the collection name and close parenthesis now whenever i click on this button it's going to clear the collection for me okay so before we push this information to a sharepoint we might want to display this information here so if we adding multiple records into a collection we want to display here and then we click on a button which will then append this information into a sharepoint list so to create a display area here i can use a gallery or i can use data table so from insert tab if i look here i can see the gallery and the data table for this demo i will use data table so if i click on that this is showing the data table here and it's also saying if you want to pick up any data source you can do it here so in our case we need to use the product collection so i will click on that data source let me move this a little bit down and make a little bit smaller and wider okay so you can see on the right hand side the data source is now added what i want to do is i want to add the fields in there so if i click on edit field and then i can click on add fields and then i can select title color and date so this is going to add all the fields from the collection into this data table so we can view it before we send it to sharepoint so click on add now there is a minor error here so on the color column it is showing an error so if i click on this drop down and add it in formula bar so because we are retrieving that color as an object instead of the text value it is not willing to show the information here so instead of call color we'll say call color.value and then it will resolve that issue let's test this for now so if i click on the play icon here so let's add some information here so if i say pen green and order days 14 add to collection yeah and then say book blue and order date maybe 15 and add to collection now you can see there are two records in the collection and if i click on clear collection it's gonna clear the collection for me so far so good next what we want is we want to have a button so when someone click that button it should take all these records from the collection and add to our product list in sharepoint okay so if i go back to the tree view and then from the top menu insert tab i click on a button let me drag this button towards end of this form let me rename this button to save to sharepoint when someone click on this button i want all this recording collection to be saved in a product list in sharepoint which we have it here so title color and order date save to sharepoint on select i want to add the function here so before we implement this we need to make a connection to the sharepoint list in our powerapp i will go to latin menu on the data tab and click on add data so you can see there's a product collection already there but we want to make a connection to the product list in sharepoint so you can save the data there so if i search for a data source and i need to search for sharepoint so if i select that you can add a connection to that sharepoint site i've already used it in the past so i have a connections here so i will click that connection now on the right hand side you can enter the site url to find your list or you can use one of the recent site so i'm using this here so i can click on the series inside it will show me all the lists inside the recent site so i'm interested in product list and i will click on connect okay now we have a connection to the product list let's look at what we need to put into save to sharepoint button on select method first thing we'll do is we'll say for all we want to do this operation for everything inside this collection for example so we'll say product collection okay and what we want to do what's the formula we want to patch so we want to patch the information to the product list so we'll say we want to patch the information product list that's the source and now we need to build the properties in the past what we'll say will say default so defaults is going to be products so it's going to be product type and then we need to map all the properties in this curly braces and i will then i will close the parenthesis for patch and also close the parenthesis for overall method okay now inside here i need to provide the information so what i want to update so i need to provide the the columns from shape and list to match so we need to have title color and order date so we'll say title so yeah title and i want to map it to the collection which is called underscore title that's the information i want from that collection to append to the column in this sharepoint list and then the next one is color the color i want to get the value from collection color attribute and the last one is order date for this one i want to get the value from order date collection attribute so let me click on this drop down and format this text okay so for all we have a collection and then we are patching and the source is the product list so we made a connection the product list already and then the default type is product and what we have is we have mapped the columns we have single line text column we have drop down column and we have mapped the datetime column from the collection to this sharepoint list columns which we have here and then we have close the parentheses so this is the complete method we are using to update sharepoint list data from the collection in a bulk operation so let's test this now so if i go back to the sharepoint list we don't have any entries here now if i come back to my powerapp and from right hand side i click on preview this app and okay i will add book blue or the date into collection and then pencil green or the date maybe eighth into collection maybe one more pen yellow and order date is maybe third back to collection so we got three records now so if i click on save to sharepoint hopefully this is gonna save this collection records into sharepoint so if i now go back to sharepoint site i can straight away see there are three records created with title book pencil pen and different colors and different order dates and if i want to clear a collection i can click here and clear the collection and then add more data into the collection again okay so to wrap up this video today you have learned how to save data in bulk to sharepoint list using powerapps collection thank you very much for watching this video consider subscribing if you're new to the channel by pressing the red subscribe button below this video and click the notification bell icon so you don't miss any of my future videos as i upload new videos every week give this video a thumbs up if you found it useful if you have any question regarding this topic or any other query related to offer 365 in general post in the comment section below i review your comments on the daily basis i will be happy to answer your questions thank you you
Info
Channel: KeaPoint Tech Tips
Views: 4,715
Rating: 5 out of 5
Keywords: PowerApps Bulk Save to SharePoint List, powerapps bulk patch, powerapps bulk update collection, powerapps bulk update, powerapps bulk update sharepoint list, powerapps save collection to sharepoint list, PowerApps use Collect to submit, powerapps collection to save multiple rows, powerapps forall patch collection, powerapps patch examples, powerapps patch collection to sharepoint list, sharepoint bulk item creation using powerapps, keapoint tech tips, keapoint, powerapps tutorial
Id: Tp5CxU3VQOs
Channel Id: undefined
Length: 15min 15sec (915 seconds)
Published: Tue Feb 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.