Forms & Submit Data to Sharepoint | HOW to use Microsoft POWER APPS (2024)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
for this final part in the beginner level  training series on powerapps I'm going to   introduce you guys to forms we're going to  set up our form customize and tweak it and   of course we also want to make sure that if  we submit the data that that data actually   gets saved in our SharePoint list my  name is jochen I am a Power Platform   consultant at seeka and I suggest we  start building our form let's do it hey guys welcome to this beginner level  training series on powerapps where I am   showing you a lot of the building blocks  you can use to develop your own app and   today it is the fifth and final episode in this  little mini series so as always there is a link   down in the video description to the entire  playlist check that out if you want to or if   you are just here for the information on forms  also fine because that is our Focus for today now let's dive back where we left our app  in the last video and that is our new order   screen and I am just gonna make sure we have a  couple of items in our shopping basket and then   click confirm order because this of course will  trigger our little pop-up that we have built and   this little thing right here is going to be our  form and I say going to be but I already added   the form last time all I did literally was type  in form here and chose the edit form I haven't   connected it to any data the only thing I did  apart from adding it is adding a little border   to it by changing these properties but that  is literally it oh and by the way the reason   why I chose the edit form and not the display  form is because we are actually going to build   a form where our user can input some data into  and not just display existing data or whatever   because that's the main difference between these  two so edit form it is and let's do the first very   important step and that is to connect our form to  a data source so I am going to make sure I select   my form and then go to to data source here or  click connect the data it will get you to the   same thing and select in this case my order header  data source because that is my SharePoint list and   as you can see automatically those fields that are  in that SharePoint list are added to my form and a   little tip because I've encountered this a couple  of times if you rename your form after you have   added it and connected it to a data source and  I'll do it right now so I'm going to rename this   by deleting the S and hitting enter as you can  see for some reason this is bugged and the fields   literally just disappear it doesn't matter if you  like exit the screen and go back to it they're   still gone the thing that I found that I could  use as a workaround and this might seem silly   but it does the trick literally just untick snap  to columns retake it it will say this but that's   all good boom and the fields are back little  disclaimer it could be that the order of fields   has now changed when that happened but we're gonna  fix that anyway so I guess that's not really a big   of a deal and to change the order of the fields  or to even delete Fields because that is what   I'm going to do you can simply when you have  selected the form click edit Fields right here   and this will give you a list of the fields that  are currently active or shown at least in my form   for example we have the attachments field which  is the default attachments field on SharePoint I   don't need it here I'm not going to use it in my  app if I can simply go the three dots here and   say remove it will remove it from the list and  from the form and you could now also change the   order of fields by drag and dropping them you get  the picture it's a very handy menu if you want to   reorder fields in your form but that's all I'm  gonna do for now in this menu at least because   the fields we are looking at right now I am going  to use them however I have a couple of different   in scenarios going on here and what I mean by that  is some Fields I actually want to show in the form   to the user other fields I want to hide but as you  can tell by the little asterisk icons that you can   see right here most of these are actually required  fields on SharePoint so that means we have to give   them a value before we can save and push our  data to SharePoint and in short I am going to   use a combination of three Field properties the  default property the visible property and finally   the display mode property let's start with the  email field and the first thing I notice when I   click this email card is the lock sign and that  is literally because powerapps has locked these   fields by default if I want to make changes to  them I have to go to Advanced right there and hit   this little lock button now you can see that the  lock is gone and my formula bar opened up and now   I can actually make some changes and let's just  do that again default visible and display mode   those are the three properties so let's start with  the default property so in short I want the user's   email to be put in here but I don't want the user  when he's using the app actually to see this I   mean he will probably know his own email right  so what I'm going to do is say instead of this   item.email we can use the user formula like this  Dot email boom so default value set user.email now   we can just make it invisible the entire card  by flicking this little toggle right here and   that's it the card is now gone the value is still  being filled in the background but we and the user   simply can't see it which is exactly what I want  now order and Order date are the same scenario I   want to fill in the fields with the default value  but I want to show them to the user but I don't   want the user to be able to adjust the values so  what I'm gonna do is default value again again   use the user function but now go for the full name  instead of email and I'm not gonna make this card   invisible but what I am going to do is make it  uneditable is that a word I guess it is you'll   see what I mean I'm going to click this data field  so not the entire card the data field and then I'm   going to go to display mode and instead of saying  parent.display mode which by default is set to   edit which is show and make the field editable  I don't want that so delete this and simply say   disabled so now the user will still see the field  he will see that the field is also filled in for   him or her but he won't be able to edit the  value next up is order date it's exactly the   same scenario as the orderer card but I already  clicked the unlock sign of camera and for setting   default date we have to click the data field  itself and then go to default date property   and instead of saying this item dot order date  a very handy function in powerapps called today   there we go so we have set a default value which  will always be filled in for us and all that is   left to do is again go to the display mode of the  data field and set this display mode to disabled   again the notes field I will tackle alas let's do  these two first total amount so unlock again go   to the default property and say and this is just  a variable that we are using which is also shown   here by the way the six dollars that you see it is  called far Global total price there we go six and   just like the email card this can be completely  hidden from our users so properties visible toggle   gone the number of items is the exact same  scenario unlock it let's go to the default   property this is our other variable that we are  using here the three items that you see so VAR   local item counter that's the one three there  we go back to properties visible toggle gone   the status field is the exact same scenario but  this is a choice field on SharePoint and that's   kinda special and also because I want to add a  little bit more logic to it because I want to   achieve that if our order total price so in this  case six dollars if that number is higher than 99   I want the order that we saved to SharePoint to  have a status of needs approval which is one of   those Choice options on SharePoint and if it's  less than 99 a regular order if you will I just   wanted to have the status ordered so to change  that first step unlock it then I'm gonna go to   my default property and instead of this item  dot status which again is the default value   I'm gonna paste my formula and I could get all  technical about this but this is simply the way   for a choice field how you have to put it in the  formula bar so this is an if statement The Logical   test is is my VAR Global total price which is  literally the total price of my order higher   than 99 if it is this is the expression that  is going to be executed if you will and that is   simply saying okay then give this Choice field on  SharePoint the value needs approval if it is less   or equal than 99 so if this expression evaluates  to false this will be executed and it's the same   thing but it's of course just the ordered value  of the status field so the default value is set   and just like the two previous cards we simply  want to hide the card altogether and the final   field is the notes field and this card in fact is  another scenario because it's not a required field   so it can stay empty so it doesn't need a default  value that's why one two I want the user to see   the card in the app so the visible property can  stay as it is being enabled or on and three the   display mode I'm also going to leave it as it  is because I want the user to be able to fill   in their own notes in the app so I don't want  to gray it out like the orderer and the order   did basically I want it to be exactly how we see  it now so I don't really have to change anything   but I'm going to either way and the only way I  can do that is by going to Advanced and unlocking   it of course and there are two fun properties  that I want to share with you because this is   a multi-line field on SharePoint I also want this  to be a multi-line input field in our app itself   and on the data field not on the entire card but  on the field itself there is a property called   mode and by default this is on single line but  I can also say text mode Dot multiline and the   second thing I'm going to change is the hint  text property also on the data field itself   so search for hint text there we go which is  empty by default and I'm just gonna say use   this field for your notes please and as you  can see it's literally a hint text so that we   give some explanation some instructions if you  will to the user so they know they can actually   use that field for their notes so we have three  fields on our form of course this doesn't have to   have three columns then and we can simply change  that by going to the columns property on the right   here on our form and change this to one final  tiny change let's just select the notes field   and give it somewhat more room beautiful final  part of the training coming up we want to make   sure that if we finish our order that our data  actually gets saved on SharePoint so let's do that and first thing we want to do is kind of set  a reset point for our form and what I mean by   that is the notes that the user enters in his  previous order don't need to be stored for the   next order right they can probably be other  notes or empty whatever but they don't need   to be the same notes over and over again so  we kind of want to reset this form at a given   point in time and that point in time is at  the home screen this point when it becomes   visible or home screen that is what I want to  reset the notes not just the notes the entire   form so in the unvisible property of our home  screen this is what we have so far so we're   doing some data refreshing well this seems  like the perfect time to reset confirmation   form as well two very simple functions being new  form and then the name of my form which is this   one in my case close the brackets semicolon and  the second line also a super simple function and   very similar reset form with the same form name  in between the brackets and you might want to   play around with these because depending on  your scenario it's not always that you need   both of them but I do want that because reset  form also makes sure that those default values   that we have set for all those fields are also  filled in or reset if you will so I just want to   make sure that that happens in my scenario so that  is why I'm going with new form and reset form in   The Invisible property of our home screen so now  that we have chosen the reset moment if you will   for our form it is time to implement the logic to  make sure that our data gets saved to SharePoint and basically there are two big steps here first  of all let's find a place to actually submit the   data to SharePoint that's one which obviously is  going to be our finish order button and the second   step is to tell the user if it's succeeded or if  something went wrong and that is something that   we can do if you select the form itself there  will be a couple of properties here saying on   failure and unsuccess those are the ones that we  will need but let's not get ahead of ourselves we   will start with the finish order button and this  one is really simple on select formula by default   it has the value false which is do nothing we  don't want that we want to do something all   right and I can just go submit form and then of  course the form name again there we go and that   is literally it that is all that I want the  finish order button by itself to do because   the continuation of that process will take place  in the code that we put in the auto failure and   the unsuccess property of the form itself let's  do just that scenario number one everything goes   according to plan the data is smoothly saved and  pushed to SharePoint all is well in the world what   do we want to happen well whatever it is we're  gonna have to put it in the on success property   of the form itself so let's navigate there first  by default again set to false which is do nothing   but we want to do three things first of all I want  to close this pop-up as we have seen in the last   video again playlist is down in the description  click the link if you need to but I'm just gonna   briefly explain it we have created this pop-up in  the last video and the visibility of the pop-up   is just determined by one local variable which  is true or false so literally when the data is   pushed to SharePoint successfully we want to close  the pop-up because his work is done so this will   be the first line of code update context and I'll  just put some comment in there height confirmation   pop-up second thing that I want to happen  I want to navigate back to the home screen   because basically our order process is done  at that point in time so we can navigate   to home screen and you guessed it navigate to  home screen close brackets and the final thing   that I want to happen is that the user gets  a notification at he or she at least knows   that the data was in fact safe to SharePoint so  notify user and the formula notify Open brackets   your order was successfully saved comma and the  type of notification is Success three simple lines   of code but in fact they will do everything that  I want to happen when the user clicks finish order   and everything goes to plan and you know what as  a reward for you guys still being here I'm gonna   show you an advanced tip let me add a little bit  more to this last piece of code bam because what   we can do when an order is successfully submitted  we have some data of that order because SharePoint   kind of gave a response back to the app saying  everything is okay and it also provides the app   with some data of that saved order and you can see  if I remove the ID and do the dot again these are   all the fields that available basically there  is kind of a copy of that record that has been   saved on SharePoint in the last submit variable  is it a variable it's kind of a variable so now   the user will not only be notified that the order  was submitted successfully they will also receive   the ID of the actual order so I think that is  awesome and that is it for the happy flow of   course chances are that something goes wrong  and that the data doesn't really get saved for   some reason on SharePoint and that is something  that we have to foresee in the unfailure property   Again by default it just says false and this  is way more simple than our own success story   because all I want to do when something goes  wrong I just want to alert the user I don't   want to hide the pop-up I don't want to navigate  to wherever so all I'm gonna do here is notify   something went wrong while saving your order  comma and this is not a success notification   obviously this is an error notification there we  go that's the only line of code I want to have   in the unfailure property if something goes  wrong we're just going to alert the user and   that's it and something that I almost forgot to  tell you in my case at least my form needs the   default mode new not added because we're  not editing an existing record obviously   in our order header SharePoint list if we  are going to use the form we are actually   going to create a new record so default mode  has to be on new almost forgot that [Music]   so a big moment because we are going to  test if we can actually finish an order   let's do it create new order let's just go  for a simple order less than 99 because I   also want to test that order logic in the  status field that we did so confirm order   this is just a simple order those  are my notes and finish order   boom your order with id4 was successfully saved  after the pop-up disappeared and the app navigated   back to the home screen I think this is a success  but if we want to make sure there's only one place   to go and that is SharePoint and yes sorry Bob  order with ID number four placed by my user the   notes are this is just a simple order three items  six dollars and the status is just ordered now   let's try to get a needs approval record in here  we can of course do that by doing the exact same   thing only instead of a simple order let's go for  the big boy right here and immense amount of paper   and you know what let's order two of those please  confirm and my note will be I really really really   need this paper thank you finish order order with  id5 successfully saved so far so good and if I go   to SharePoint and I hit refresh order with id5  I really really really need this paper and needs   approval as a status my work here is done so there  you go a fully functional office supplies ordering   app I really hope you enjoyed this beginner  series I sure did as always and I know I keep   repeating myself but this will be the last time I  promise there is a link to the entire playlist of   this training mini series so if you want to check  that out please do and if you have any questions   whatsoever please use the comment section as well  that is what it's for and of course do not forget   to like the videos and hit that subscribe button  if you are interested in more content exactly   like this thank you so much for watching guys  and I will see you in the next one take care [Music]
Info
Channel: Cegeka Business Solutions (Microsoft Inner Circle)
Views: 22,831
Rating: undefined out of 5
Keywords: how to use microsoft power apps, how to use microsoft powerapps, how to use powerapps, how to use power apps, beginner, training, course, basics, powerapps, powerapps tutorial, power apps demo, microsoft powerapps, learn powerapps, power platform, power apps sharepoint lists, sharepoint lists, create an app, power apps, microsoft power apps, sharepoint, develop app, low code, ms power apps, power app, tutorial, sharepoint form, form submit, submitting data, powerapps form, 2024
Id: A2i0Qr25Zqo
Channel Id: undefined
Length: 20min 10sec (1210 seconds)
Published: Tue Jan 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.