Get started with Power Apps: A tutorial to Building Business Critical Apps the Right Way - ID Card Make

Get started with Power Apps: A tutorial to Building Business Critical Apps the Right Way - ID Card Make Hello everyone RZA here in this video I will show you the right way to get started with building business critical applications with the Power Platform we will take a common scenario and expense reporting solution we will set up our own development environment use Solutions data ver tables take help of co-pilot build our application secure our data and a lot lot more so let's.

Get started with Power Apps: A tutorial to Building Business Critical Apps the Right Way

Check this video out in action let's begin with exploring the right way to build business critical applications leveraging the Power Platform to build an app we start with power apps we begin with make. power apps.com that lands us us into an environment to begin with and this environment is known as the default.

Environment now if you select the environment picker this will list out all the environments that you have access to a powerplatform environment is a space to store manage and share your organization's business data apps flows Bots and more the default environment is ideally best suited for personal productivity based scenarios now let's take a scenario here of an expense reporting solution that I.

Would like to build for my organization I would like to build that in a specific environment now the simplest way to get access to a power platform's environment is by leveraging the power app apps developer plan which allows us to explore the Power Platform at full potential for development or learning at no cost and to create a developer.

Environment head over to settings and go to the admin Center head over to environments in the admin Center this will only list the environments that you have access two and in here if you click new you can give a name for your environment I'll pick my region and the type of the environment that I will select is developer these are special environments.

Intended only for use by the owner of the environment the owner is the user who is creating this environment I'll click next and then I will click save and this will begin the process of creating a development environment for the user once this environment is ready if I go back to make. Power.

Apps.com the environment picker will now include my new development environment and if I select it it will swap the environment to my development environment and observe right here it clearly specifies that this is a developer environment and not meant for production use which is ideal for me to build my solution first and then deploy it into a production type environment.

Where I can go and share the applications with my end users and whenever we speak about Alm the first thing you should be thinking about is Solutions this is where I can start creating my solution and start adding components into it now Solutions are used to transport applications and components from one.

Environment to another so let's begin with creating a solution I'll give my solution a name I will call it expense reporting publisher now we've got default publisher options here but as a best practice I'll recommend going and creating a new publisher now what's a publisher the publisher of a solution where a component is created is.

Considered the owner of that component and with a solution publisher we can also include a prefix which is a helpful mechanism to avoid naming conflicts so here I'll create a publisher with my initials give it a prefix and we can clearly see that any object that will get created in this solution will have this specific prefix.

Associated with it I'll click save so this will create the publisher and now for my solution I'll pick my publisher that I defined I'll click create and this creates a solution and in this solution is where I can start creating canvas apps M driven apps custom Pages automations Bots security roles tables.

And data ver and a lot lot more the best practice is to always create any component in a solution however typically we end up creating things outside of solution context for example I go to make. Power apps.com and I say I want to create a canvas app or I go to Power automate and try creating a flow if you've created things outside of.

    Solution context we can bring it in solution context by going to add - ID Card Make

    Existing selecting the type of app or automation that you've created and then you can start bringing things into solution context now one of the new features that we can take advantage of is Solution by default now if I go back to the admin Center my developer environment for which I am an admin off if I select this.

    Environment go to settings product features we have the ability here to create new apps and flows in solutions by default so I'll go ahead and turn both these features on we also have another new Option called preferred solution this allows the maker in that environment to decide which solution is.

    Your preferred solution so any new objects that are created in that environment will land in that specific solution so I've turned these settings on I will click save back to power apps now if I go to Solutions I have an option here called set preferred solution and by default the preferred solution is the common data services default solution so this this I will now.

    Change to my expense reporting solution I'll also check the option to show preferred Solution on the solutions page my preferred solution is defined as expense reporting that means anything that I create outside of solution context in this environment will land in this specific solution I'll go back to home in developer type environments we also get the co-pilot feature which allows us to.

    Describe our app requirements in everyday words that's right here on the home screen experience if I was to start creating a table in data verse here as well I can simply describe my table by simply working with a co-pilot that lights up now why do I leverage data verse data verse is a secure scalable intelligent platform for Microsoft Power Platform and Dynamics.

    365 from a security standpoint authentication and authorization derived from Microsoft entra ID you can Define role based security you can secure your data down to the column level from a logic standpoint you can Define business rules workflows calculations formulas dat comes with Rich data types you can create complex relational data structures it's a scalable datab base.

    Plus powerful integration capabilities data importing exporting analytics and the magic of application life cycle management so let's begin with co-pilot to create our first table in data verse I've described my intent here with which is I need an expenses app I'll submit so AI co-pilot recommends a table for expenses with different types of.

    Columns here I can work with the co-pilot to change the schema of my table I will interact with the copilot to make some changes in my table I've said change expense ID to expense title which it has done I've asked it to remove move category amount and date next I'll say add columns for start date and end date you can see the different data types that are being assigned to the column expense title is of type text.

    Description is text area and my date columns are of type date and time so I've said create a choice column called expense status with values new pending approved and re rejected and I can confirm that by viewing the type of the column which is choice and here are my four choices now at this point I will go ahead and click create app so what copilot will do is it will create that.

    Table in data verse and create a fully responsive single screen canvas power

    App experience that will allow me to interact with that table remember the steps I've taken right now are outside of solution context but because I have Solution by default feature turned on and I set my preferred solution as expense reporting if I explore my solution you can see how the solution contains a table that got created through the.

    Process of me interacting with the co-pilot and this table gets that publisher prefix which is rdcore and here is the power app it's connected to the expenses table if I click edit I can see my columns my data I also have copilot here in the studio experience itself so I can work with the co-pilot to make further changes to my.

    App and if I preview my app here it's a single screen fully responsive canvas power app experience that works on all device types and sizes here I have a gallery on the left where I can select expenses that are created in that table I can see the details I can edit the expense details just change the description on this one submit and that change will.

    Immediately be reflected in my data source I want to allow the user to add line items for a specific expense classic scenario where I need relational data one expense can have many line items so now comes the next step for me to create another table which I can do directly in the canvas Studio experience itself can go to data click add data and say I want to create a new.

    Table now here I can simply describe my table in everyday words and work with the code pilot once again to create a table I even have the option to upload an Excel file in this case I'll create the table myself so I'll say start with a blank table I'll give my table a name I'll call it line items the primary column I'll call it name description about the line.

    Item you can see that I have various various types of data to to choose from here I'll pick text area for description date I can even make Fields as required in the data source a line item needs to have a cost associated with it I can pick the currency data type for this one the category of the line item this I can make it column of type choice so I can.

    Define my choices for for example food gas and miscellaneous we'll just save this one and I will click close this will go and create the table and connect it in my power app solution view now to create the relationship between these two tables if I simply select the line items table here we have an option here.

    Relationship many line items will be related to a single expense I'll pick expenses what's the name of that column I would like to call that column related expense and when I'm creating a relationship I can also Define which type of relationship I want to create in this scenario I'll create a parental type relationship meaning if an expense is deleted I would want the line.

    Items to be deleted so that creates the relationship if I go back to my line items table here and if I go to columns here I can add more columns I would want the user to upload a receipt I'll pick the type as file and an image I need another screen for line items I can simply say create a blank.

    Screen start with data pick line items and just like that I will get a second screen that I can rename to line item screen and this screen provides full crud operations create read update and delete in my line items table so for example if I click new this is where I can create a new line item now that relationship that I created which resulted in a lookup colum in my line item table called related expense I.

    Will add this now line items will be created for an expense so in my home screen here in this specific container here I will go and insert a button I will call this line items and when the user selects this I will simply navigate the user to my line item screen so if I click takes me to the line item.

    Screen now in the header where we have the text line items I'll go ahead and concatenate some additional text for which expense I'm adding the line items in my main screen my expenses are listed out in a gallery that I have renamed to expenses Gallery so in my line item screen in the header I can use expenses Gallery that's.

    The control on my home screen do selected and Dot this exposes all the properties one of them is expense title I'm working on line items for expense one now in this container I would also like to add an option for the user to go back to the previous screen on select of this icon I'll simply use the formula back so starting from the home.

    Screen I can select expenses this one is expense one if I click line items I'm viewing line items for expense one if I pick expense 2 and go to line it items now I should be viewing line items for expense to now the related expense lookup is where that relationship is maintained this lookup column needs to have the value of expense two selected by.

    Default so for this data card which I will unlock it's default property I will set to my expenses Gallery do selected if I was to pick expense one and land on this screen now the related expense would be expense one and this data card is something that I can hide from the users view so let's create a line.

    Item this is a food related expense I'll put the cost pick the category pick the date and optionally I can also upload a receipt I've uploaded a receipt I'll click submit and this will go and create a line item now I've made quite a few updates to the app so always best to save the app and go ahead and publish the app back to my power.

    App if I pick a different expense on my home screen now which is expense two and go to line items still shows me the expense for expense one the reason is because the gallery on the line items screen is connected to the entire line items table so this I will change to my expenses gallery. selected dot line items so we can see there are no line items for expense 2 but if I go to.

    Expense one I can see the line items if I create another one and save that's another expense that gets added for expense one whenever an expense is submitted by a user it should begin an approval process when an expense is created it should be associated with a cost center so here I'll create a new table.

    I'll call it cost center so I have name for my cost center I'll add another column called approvers I can Define my cost centers let's say Microsoft and contoso and I can Define who my approvers are so resa is the approver for cost center Microsoft for Koso it's going to be Sarah and.

    Resa now from my expenses table I would want to create a column again I'm creating a relationship I'll call this column related cost center and I'll make this a lookup column that looks up to the cost center table and if I go back to my canvas app now I will refresh my expenses table connection for my expenses form on the home screen I can go and add related.

    Cost center now if I was to let's say edit an existing item here I can also Define a cost center and the same solution is what I have gone ahead and built out further so I'll go ahead and create a new expense I can pick my cost center click submit my expense gets logged the status is new I need to.

    Submit it for approval so if I go to line items there are none so I'll create one so I'll create a food related expense once again I can upload a receipt I'll submit I have the ability to submit it for approval and when I submit the status here will change to pending and I'll get a notification that.

    This expense request has been submitted for approval now this is a canvas power app we can also build a model driven power app and in this scenario I've built a very simple model driven power app and all I've done here is just connected expenses and cost centers to the site map the model driven app is designed with admins in mind I can see all the expenses and I can also see the.

    Information and the cost center table so if I want to add another cost center I can easily go ahead and do that right here in the model driven app and in the can app if the user Wass to create a new expense you can see that new cost center lights up right here you can have a canvas app and a model driven app complimenting each other now the expense that I created the status is spending I had picked Microsoft as the.

    Cost center so resa is the approver for that in my solution itself I also have a cloud flow this flow triggers whenever a row in the expenses table is modified and the status of the expense changes to pending now expense status is a choice column so if I explore the choices for expense status for pending this is the.

    Specific value that's exactly what I've leveraged here so my flow triggers when the status is pending and once that happens I go and get the details of the cost center because I need the approver information and then I begin an approval process I check the decision that the approval takes if it's approved I update the status of that specific expense to approved else I set it to reject.

    It Resa being the appr R receives an approval action the approval action specifies the details of the expense request that has come in there's also a link which if the approver clicks will deep link the user directly to that canvas power app and highlight that specific item under approval can go to line items as the approver and the approver can directly take the approval decision in the email itself.

    I'll approve it enter commands and submit my response now once that's done the user who created the expense will receive a notification that the expense has been approved yes's the name of the approver here are the commands and here's a link directly to that specific expense item and I can see how the status has changed to approved in can apps we also have a.

    Co-pilot control and for this control all I have done is I have connected a data source which is my expenses table as a user I can ask questions to co-pilot about my expenses for example how many expenses are in pending status and copilot has context of the data it understands the user context it will respect security here so it says.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continuetomake videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=pp6wBvy9Wgs
Postagem Anterior Próxima Postagem