Use Power Apps to Populate a Word Document with No Premium Licenses

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's go ahead and try a software project now I'll name it two and this one will be 60 project phase it'll be Clos green 60 hours of work customer support true testing let's submit let power automate run in the background refresh we now have a new software document you see the actual work came through the work came through we created a new document metad is filled out we can open the document in uh SharePoint and all the metadata is already filled [Music] out hey everyone this is my SharePoint questions and I am Andrew Hess so today I wanted to go over using Microsoft Word with power apps but one thing that a lot of people run into is when you use Microsoft Word with power apps it actually uses a premium connector you can see here word online for business power apps premium we're not going to use that premium connector we're not actually going to even have a connector to word and the same thing here for power automate if you wanted to use power automate it also uses a premium connector so instead what we're going to use is based off my last two videos is content types and we're going to populate Microsoft Word through SharePoint with content types no premium connectors so if you guys have been enjoying my videos uh thank you very much my last two videos have been dealing with content types I just want to say thank you to everybody and if you're new here please like And subscribe and let's get into it all right so the first thing that we're going to do is we're going to create these content types so I'm going to go to uh site information view all site settings and I already created the site columns in my last videos so if you want to watch Watch How I created site columns you can do that so here in site content types we're going to create a new uh content type it's going to be regular document right because we're going to create a document today and we're going to use an existing category we we did all this before but this time we're going to use document content type and the content type of type document and we're going to create now we're going to add some site columns from existing site columns that's we already have and we grouped them here so in a regular project we're going to have actual work assumptions benefits deliverables we're going to have those columns here customer support and uat is for our software projects I'm going to go ahead and save so we created One content type so our next content type is going to be software documents and we're going to use my existing category and it's of type document and document and this one has a few different columns that we created customer support all right so we have two uh type document uh content types so let's go back to SharePoint so this is my SharePoint list now you create can create a new document library or we can do this in the outof the-box document Library um it kind of depends on what you want to do so if you had documents that were for all projects maybe you wanted to put instructions in there or you know how to build a work breakdown structure you could do that in the outof the-box documents don't ever delete the outof the-box documents uh Library I promise you you don't want to do that so I'm going to go to new and I'm going to create a new document library and I'm going to call it a project documents now I didn't put a space in there out of habit um that's just something I do I'm going to say show a a navigation so we have my new projects documents uh document library and here we're going to add our content types I'm going to go to library settings I'm going to go to advanced settings and I'm going to say allow management of content types I'm going to say okay in the content types here we're going to add our two document content types that we just created so add from existing and they should be grouped we have regular docu oh I made a mistake uh I'm going to let it go I forgot an s on one of them we have regular document and software documents uh I made a little mistake hopefully that's okay all right so we have two documents right regular documents and software doc docment now I went ahead and prepared a couple of Word documents and pretty much they are just basic basic Word documents so I just wrote this in here we haven't attached anything to them so I just went in here and basically wrote each of the column names in there and we're going to want to pull this data into the document automatically through power apps all right so what we're going to do is we're going to go to settings um um Library settings in library settings on regular documents so we'll click on regular document there's a feature in advanced settings and right here it's a document template right so we're going to upload and we're going to upload the regular project into the template right so I'm going to do the same thing for software documents and to show you that again so we're in Project doc documents settings Library settings you click on the content type software documents then you go to advanced settings upload a template and then upload your word document template that you have in there and and you probably have one better than I have like I just basically threw something together but you know people make awesome word templates all right so I uploaded that uh word template in there all right so now let's go back to our document Library we're back in our document Library if we click new and we do regular project you can see it brings up that template One Step we're done that's pretty neat right so same thing here if we do software project it brings up that template so you can see the fields are actually different here cuz software projects have a couple of different fields but now what we really want to do is we want to attach the metadata of the content type to the word document so let me rename these so what I'm going to do is I'm going to open this in client in the app I'm going to open an app so now that I have it opened in the app make this a little bit bigger what I'm going to do is I'm going to go to title I'm going to say insert quick Parts quick Parts document property you look in here some of my my fields from SharePoint are in here title quick Parts document property work quick Parts document property actual work all right so now I'm going to do the same thing in software projects I'm going to open open in the app I'm going to open in Microsoft Word I'm going to attach the metadata by using insert quick Parts we're going to do the [Music] title work project phase project status customer support uat testing all right and we're going to let it autosave it's Saving right now so now now that I have our two templates I'm going to download both of these templates all right so I'm going to download I'm going to download both of these temp that I've downloaded both of these templates I'm going to re-upload the templates back into to the content type templates so I'm going to go back into the project documents Library settings regular documents Advanced I'm going to upload a new document template I will choose the regular project template so yep that's the one we just did now let's go back to software documents and I'm going to reupload the software project template all right so now we've reuploaded those templates let's add some Fields into this view now in order for the quick parts to work we actually have to open these documents in the client in the app so I'm going to go to settings Library settings in advanced settings I'm going to say the default Behavior to open the documents is in the client application so I only want it to open in word I don't want it to open in the browser and I'm going to click okay all right so now I've added a a couple of fields into the view right uh the ones that are duplicate on both content types so when want to click new and do a new regular document you can see the properties are opening up on the right side right so we have the title so uh regular project Title One and the actual work we'll say is uh 40 and you can see it actually filling in the information on the right side and so when we save we just got to make sure when we save we're you know we're in the site and then uh task list project documents we just want to make sure the first time when we save we save it there so this is um Regular first regular project and so we're going to save it there got it I'm going to close so we saved to our SharePoint library and look the data I didn't write anything in SharePoint the data went straight into SharePoint right so if we open up this document that data is still here you know we can even we can write some major assumptions in this document and this time it's going to Autos saave to the right place so I can just close it and if we put in that uh column or if we take take a look right here and we go to the the three dots and we go to the properties of the document we can see right here what I just wrote in Microsoft Word I didn't write this in SharePoint I wrote this in word I can write it in here in SharePoint I can write it in here in SharePoint and it will populate the document so right I I wrote in benefits it will populate the document I think click on the document and it will populate the document the document was then populated from writing in SharePoint so we have that connection now that we have that connection we're going to go to power apps all right so we're in power apps on a blank canvas I just created my connection we're going to connect to that project documents Library all right so we connected to that project documents Library we're going to create a form an edit form and the data source will be that project documents what we're going to do is the same thing I did on my last video is we're going to add in the content type uh v um field all right so we have our content type field so I I did the same thing last time on my last video we're going to add a little drop Dr down so we'll have two items we'll have regular projects and we'll have software projects all right so we have a drop down between regular projects and software projects I'm going to duplicate this form except for this one will not have assumptions benefits and deliverables it will have customer support and uat testing and then we're going to set up the the default selected items here so I did this in my last video I'll show you again so the way you set up a default selected item of a content type is down here you have to put in this o data type formula on the on change of this dropdown we did this in my last video let me pull in that formula If drop content type. selected value equals regular projects then we're going to update this uh variable and we're going to do a new form if we do uh if it doesn't equal that we're going to update this variable to false so I'm going to put this in the onchange property of my dropdown here and looks like I renamed both of my forms let me rename them so this is form regular and this is form software and that should fix the red X of my onchange property all right so um now we're going to do the visibility here so the visibility of this form is variable content type so if regular projects is view you'll see the regular projects or software projects all right so in order for a submit button to work we're going to have to use power automate and this is the way that I figured out how to do this is we're going to upload our document templates to our site asset Library cuz we're going to use those templates in power automate in our site assets we can store our templates here and it's probably a good idea that way you don't lose them anyways and it's not on uh your computer Compu I'm going to store the two templates in our site assets of our site collection in power app what I'm going to do is I'm going to do on my submit button I'm going to do Action Power automate and I'm going to create a new flow and this flow is going to be created from blank and the first step we're going to do is we're going to get file I believe it's content using path get file file content using path all right and the file is going to be in our site assets and we're going to choose regular project template I'm going to do the same thing I'm going to get file content and I'm going to do the same thing on software project site assets and I'm going to get software project template okay so we have both of those get file content paths then we're going to create file and this is going to be in SharePoint so create file so the site address will be our site collection right so site collection the folder path is going to be our project documents the file name we are going to ask in power apps the file content we are going to so let me rename these let me rename this this is file content regular project and this one is rename file content regular uh oh software project and I'm actually going to do a branch here so we're going to do a uh a condition and it's going to be asking power apps if it's equal to regular project then we're going to create the file here on the left side it's going to say yes and it's going to create the file content of the regular project and then on the on the left side we're going to create a file or this is actually the right side the right side we're going to create a file and it's going to be in the same folder see if I click that right in the same folder project documents we are going to get the file name and the file content will be of the software project type so let's update the file properties so update file properties in SharePoint so update file properties the file exists in our our site collection the library name is Project documents now the unique identifier is the one that we use to create the file all right so then the title we'll pull in the title actual work ask and power apps project phase this little um button right here in Gray see more ask in power apps same thing here enter custom value for project status see more ask and power apps work see more ask and power apps assumptions see more ask and power apps benefits see more ask and power apps deliverable see more asking power apps content type ID so on this side it's going to be regular document all right so on the type regular document we're going to fill in that information so now let's do the same thing on the right side for software projects so update file properties Library name project documents ID the one that we use to create so item id title it's going to be the file name actual work actual work here we're going to enter a custom value and it's going to be the project phase custom value again it's going to be the status value the work work uh assumptions benefits liberals we're all going to skip enter custom value for customer support and it's going to be asking and power apps we did not do this before ask and power apps here enter custom value see more ask and power apps content type ID is going to be of software project documents software documents all right so now based on the condition is equal to regular projects it's going to go do the left side and do yes it's going to create a file and update those properties on the right if it's not equal to regular projects is going to create the file create file two we use that item id here from create File 2 and it fills in the properties so let's save all right so we did use power automate but we did not use the premium connector so there's no extra cost that we're going to have to do here so let's go back to power apps all right so in power apps I have renamed my two title Fields so this is text software title and this is text regular title so let's do our submit button now we're going to use an if statement here also like we did last time so if drop content type do selected. value equal equals regular projects so that's our drop down right here regular projects if it's equal to regular projects we're going to run this power automate flow so if we get the name of it Power app and it has like an arrow in there but with the Intellis sense it should pull it up for us so right here the one with the run we're going to pull that one in so power app that's the full name of my power app I'm going to use the int up here to help me so under regular project if it's equal to regular projects we're going to run we're going to use text regular title. text next condition so the condition is actually our drop down here so this is our drop content type. selected value all right next uh update file properties actual work that is our text regular actual. text next update file properties project phase so drop regular phase do selectedvalue uh file properties project I believe this is uh status so this is drop regular status. selected. value and so we can use our intelligence even more um next is work so text regular work dot text and then next is assumptions bit of and deliverable so text assumptions. text text benefits. text text uh deliverables text and then we have customer support value will be blank and the next one will also be blank all right so if it's equal to regular projects we're going to fill all that out if it's e not equal to regular projects we're going to run the power automate again uat do selected. value all right let's format that and kind of take a look all right so we're we've got it formatted in a nice view if the drop down is equal to regular projects we're going to update these fields with this power automate if it's not equal to regular projects we're going to update these fields which is my software Pro uh project fields and run power automate finally Let's test it out all right so we have regular projects and software projects I do have a title in here let's do 40 assumptions no assumptions no benefits no deliver robbles initiate well let's let's change it to plan work is 40 also all right so we have all of our Fields filled out let's submit all right we submitted power automate is running in the backround let's go back here there's nothing in here yet let's hit refresh there is it is a a document in here but we forgot to put Doc X in there let's go back to power apps in power apps in the actual names we're going to put and Doc do docx so I made this mistake it's all right we can go back and fix it pretty easily all right let's try it again so we're going to use the same Fields I'm going to hit two and hit submit and we're going to let power automate do its thing hit refresh we now have our new document in here it is of content type regular we open it up the fields are already filled in so we've populated this through power apps it's also populated the metadata in SharePoint so that's really neat let's go ahead and try a software project now I I'll name it to and this one will be 60 project phase it'll be close green 60 hours of work customer support true testing let's submit let power automate run in the background refresh we now have a new software document you see the actual work came through the work came through we created a new document metadata is filled out we can open the document in uh SharePoint and all the metadata is already filled out if we make a change here if I were to make a change here and hit 5050 and then let it autosave it's actually going to update in SharePoint also in work work is now 50 so work was actually autop populated in SharePoint so let me delete this one before we put the doc X in there we now have a full working power a um Power app that fills in a Microsoft Word document and we did not use any premium connectors now I know you may not think that's a big deal but that's a big deal for me because I work in the government and if we can do things for free without using taxpayer money I promise you people will be much happier than us purchasing licenses for power automate to run premium connectors so I know other people can design uh much better um Word document uh templates in here you know you can have some nice HTML tables all kinds of things that you can do in here to edit your document template but we have populated a Word document through power apps and power automate no premium connectors metadata is in SharePoint metadata is in the word document so thank you guys for watching this was probably a very long video but it's very complex and I think this is very powerful and this can this video maybe Microsoft doesn't even want us to know how to do this very complex thank you guys for watching I'll see you next time
Info
Channel: Andrew Hess - MySPQuestions
Views: 39,450
Rating: undefined out of 5
Keywords: power apps, powreapps, powerapps, microsoft, power platform, word, document, power automate, flow, no code, low code, no license, license, quick parts, documents, upload document
Id: C-DU1VYYa_0
Channel Id: undefined
Length: 30min 8sec (1808 seconds)
Published: Mon May 23 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.