Go out to these selected approvers and more so let's check the complete process in [Music] action now the items that are being.
Listed here in the gallery currently has a formula that is not delegable so first let's fix this I'll use the function filter filter my data source and I'll use the function.
Starts with which is a delegable query the title of the expense starts with the text that the user enters in this text box so now there's no delegation.
Warning I only want to show the user the items that they have created or they are the approver for and to do that I will combine this with an and condition put a couple of brackets.
My first condition will be created by. email is user. email or approver email is user. email so when the approval will come in.
It should select the item which is under approval then they can go and edit and make modifications now at this point you have full flexibility to decide whether the.
Approver can make any changes to the actual expense details that were submitted by the user for example let's say the amount I do not want the approver to change that.
And unlock the card display mode if form. mode is form mode. edit then you set the display mode to view else you respect the display.
Mode so you can see when I'm editing the item I can't change the amount approval info this is what I want the approver to change and set now approval status is pending the.
Approver can change this to approved or ejected to take their decision but they can make this empty so I want this to be a required field which I can easily.
Posts Related:
- Flow Control Combining And Separating Bundles of Data
- DAX for Power BI Part 5.2 - Removing Filters in Measures
- How To Design Responsive Tabs Using Pure CSS - Live Blogger
Do by setting the required property to
Form 1. mode is form mode. edit so you can see it's required I'll want to do the same for approval.Commands approver I would like to handle this a little differently this should be required only if the approval status selected here in this drop- down control in this data.
Card is pending and the mode of the form is added the approval status combo box control I'll copy its name approval card required field will.
Be if the combo box for approval status do selected. value is pending and the form is in edit mode so notice this is required only if the status is fending otherwise no.
If the decision is going to be pending I would want them to pick a new approver so for the approv data card the default property which is currently as follows I.
Was checking if the form mode is new then set it to the users's manager else if the case is form mode. view then you pick the current value but if.
The form mode is edit I would want to make this blank to begin with so notice now when the approver who will be the.
One getting the edit option edits it notice approver is empty they try to submit required field validations will come into play but if they pick approved then this.
Is not a required field now if approved or rejected is selected in that case I don't even want to show the approv data card so for the visible property of the.
Approv data
Card if the approval status combo box selected value is pending then you show it or if the mode of the form is new so notice it's gone cuz it's.Rejected or it's approved but if it's pending it will show up which would be the default Behavior also it is possible that I pick a.
User but then I change it to approve or reject the fact is that if I head back to pending notice that value is still set I want to clear this control which in my case is called data card value.
7 whenever the approval status combo box changes so on change go and reset that data card this time notice I have a value set I take a decision I decide no I want to.
Keep it pending it resets the approval commence data card default this this is well I want to make it blank to begin with if the form is in edit.
Mode that's because I want to give every new approver the opportunity to enter the commands so I'll change this as follows if the form is in edit mode make sure it's blank to begin with else skip.
The value as is the approval history field I will have to make an update when the approver takes a decision so this data card has an update.
Property currently it set as follows I'll change this to the following if the mode of the form is edit which would be the case for an approver.
Only go and add this text at the current date and time approval decision by the current logged in user is data card value six which is my approval status and also goe and add the approval.
Commands that is coming from this textbox control and to all of this go and append the current value of the approval history data card value..
Text this will add the logic for appending the information of the approval history this edit icon visible is currently set as.
Follows to this I'll want to add two other conditions the first one is my gallery do selected. approval status. value is not equal to blank meaning something has.
To be selected in the gallery and my second condition is the status of the selected item of the gallery must be pending and the current approver should.
Be the current user and notice the edit icon goes away because the current approval for this item is Sarah who is my manager and delete I do not want the.
User to delete I'll simply go and hide this icon and on success of the form where I was sending the email if the status is pending.
Other than pending the only two options are approved or rejected so in that case as well I would like to send an email I'll put a comma and here I'll put in another send an email action this one.
Will go to the person who created the expense to tell them that their expense request has been approved or rejected that completes my app I'll.
Publish the power app I need to share this app with my users this opens the sharing dialogue it's an expense app I want my entire or to use it so I'll share it.
With everyone before sharing please note these are the connectors that the app uses Outlook to send the email Office 365 users to get the current logged in.
Users manager SharePoint I have to ensure that the users who are interacting with the app have access to that SharePoint list I'll go and share the.
App and I will go to the SharePoint list for my scenario I'm sharing the app with everyone so everyone has added permissions on this site so they can contribute data to this.
List let's create a new expense I'm signed in as Resa the request will go to my manager in active directory Sarah to begin with I'll.
Submit I can see all the approval info I cannot edit the item because at this point it's gone for approval to Sarah Sarah gets the email that has the details of the submitted.
Request plus a link to the power app now when Sarah clicks this it will open the URL in the URL is the ID of the item notice how the power app directly selects that.
Item and Sarah now has the option to take the approval decision by editing this item Sarah can see all the details change if needed and take the approval decision now Sarah would like to forward.
This to another approver all she has to do is decide who that other approver is people picker I select James tries to submit no you have to.
Enter the approval details Sarah plugs in her commands submits her response the item is gone from Sarah's Q James receives the approval email.
Here are the details here's the link James opens that app straight gets into that item James can see the entire approval history first it was assigned to Sarah.
Sarah's decision was pending these were the commands Sarah entered and right now it's for James's approval James can forward it to any other approver or take the approval.