Action to request an approval process from a power app in my scenario the data source is a simple events information list in SharePoint for the approval process I.
Need a certain set of columns I'll add a column of type Choice I'll call it status I've gone ahead and plugged in three options pending.
Approval this will be the default status the moment an item is created in this list and then based upon the final approval decision the status would either be approved or.
Rejected next I'll add a person type column I'll name it approvers go to more options and allow multiple selections then I'll add another person.
Type column called assigned to next I'll add a multi-lines of text column call it approval history and finally a column of type.
Number I'll call it decision taken and the default value for this I will set it as zero that completes the columns that I need to manage the approval request.
Process in my power app I have the SharePoint list connected and on my home screen I'm leveraging the modern table control to show the items from my events info list.
This can also be a gallery control Now to create a screen that allows the user to enter information into my events info list as well as track the approval request.
Information I'll head over to new screen and one of the new modern screen templates is called approval request I'll go ahead and select this in in this template we have a form.
Control I'll go ahead and connect this to the SharePoint list to connect the home screen with the form screen in the home screen I have a.
Posts Related:
- 8600 Corel Draw Templates Free Download CDR Files Sheri Sk Office
- Eid Mubarak Free and editable** powerpoint presentation whatsapp status** free download
- How To EASILY Add Checkboxes To ANY Microsoft Excel Table
Button called add
Event on select of this button I will first reset the form the form called approval form one in my case which is in the form.Screen and then navigate the user to my form screen the table control has a property called on select I will set a variable called V.
Item and its value will be my table controls name do selected then I will use the view form function my form called approval form one and then I will navigate the user to.
My form screen click add event takes me to my form screen to allow the user to go back to my home.
Screen in the header control there is an option to place an image in the logo property I already have an image uploaded in my app called.
Back and there is also an on select logo property here I will use the function back so I can click on this to take me back to the home screen if I click add event I have the ability to add a new.
Item in my events and full list and I can do that by clicking on this button called submit request which is a part of the template so it submits the.
Form and the form control has an on access property so when the event is successfully submitted in that case I would like to navigate the user to my home.
Screen approvers is my person type column multi select and we can see that the modern combo box control does not work well with person type.
Columns so we will make a slight
Adjustment here temporarily I'll go and insert a new screen blank one and in here I will insert the.Classic edit form control connect it to my SharePoint list this form will leverage all the classic controls here is the approvers data.
Card and here is the classic combo box control right click copy go to the approval request screen select the approvers data card.
Advanced unlock select the modern combo box delete right click paste here comes the classic combo box control I'll go and copy the name of.
This combo box and the two errors that are occurring here all I have to do is use the reference of the classic control that I just pasted here so I'll just.
Replace the names and I'll do the same for the other properties since this is the classic combo box control if I head over to properties and.
Fields Primary text I can show display name search text I'll also use display name click preview and now I can use this to search for users.
In my active directory here the user is selecting the approvers and we can make this data card a required field by simply setting the required property to.
True assign to when the user creates a new item this should hold the value of the first approver that is entered in this multi select person type column so for the assigned to data card I'll.
First go and unlock and for its default property I will use the formula if the approval form. mode is form mode. new then go and get the first value.
From my classic combo box control that I added here else you keep the value as it now this is a modern combo box control if I head over to properties and.
Fields I'll go and add a field here to show the display name if I preview notice it picked Resa because resa is the first approver here let's.
Remove Resa now there Sarah and this data card for assign to has a property called display mode I will change this to display mode. disabled as I do not want the user to.
Make any changes to this the sidebar container we have this Gallery control that represents a status indicator like experience for your approval.
Process this entire sidebar container should only be visible if the form control is not in new mode so to this existing formula I will append an or condition approval form..
Mode is equal to form mode. new the sidebar container is not visible because currently the form is in new mode the user can fill out the form select the approvers submit the.
Request and at this point I want to start an approval process we will Leverage power automate I'll create a flow that's of type automated Cloud.
Flow where the flow will trigger when an item is created or modified in SharePoint I'll give my flow a name and click create for the.
Trigger I'll pick my SharePoint site and pick my SharePoint list next I'll add an action pick the approvals connector and select start and wait for an.
Approval approval type I will pick first to respond the title of the approval I'll say event approval for the title that the user.
Entered assign to this I can directly Leverage The assigned to person type column that has the information of the first approver I'll pick the dynamic content assigned.
To email now once the approval decision is taken I'll add an action compose action and here I'll use an.
Expression I'll use the function add go to Dynamic content and select the column value for decisions taken and to this I'll add.
One I'll click add rename to decisions taken then I will add an action which will be a.
Condition to check to see if the outcome of the approve approval is this equal to approve if yes I will add an.
Action to update the item in my SharePoint list once again I'll pick my SharePoint site and my SharePoint list ID the dynamic content ID of my.
Trigger action Advanced parameters I'll click show all so the this will list out all the columns status.
Value this I will want to set conditionally depending upon whether this is the last approver in the approval chain to do that I will enter custom.
Value and write an expression if equals the length of approvers Dynamic.