cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Createing a Power App with multiple Approval Steps and saving to sharepoint

I am making a power app for a approval process which lets say has 10 steps. I have created a sharepoint list to store the response to each step as a individual column and the approval record. 

 

At first, I would like the responder to fill the frist 3 steps and then send it for approval. Once approval is obtained, only then can the responder fill steps 4-7. After this the responder as to submit the form to the second approval. Once approved the responder can submit the last entires for the final approval. 

 

Is it possible to set up an edit form that intergrates with power automate in this fashion? I was hoping that the resonses to each step are stored in one row. i was also hopeing that lets say the responder is in step 1, they can't respond to the questions in step 2 and 3. Simialr for the step two, the user can not edit what they entered in step 1 and they can not fill the quesitons in step 3. 

 

The other thing I would want is that the responses and approvals be stores in the same row.

 

I have read about patching, but I have nevered used it before. Is it possible to use patching and a editform at the same time for my case?  

2 REPLIES 2
RandyHayes
Super User
Super User

@Anonymous 

You mentioned that this is in a Form, so I would ignore anything about Patching.  You can submit your form as normal.

 

The key to what you are doing is that you need to store the "current step" in your record.  Then in your app, set the visibility and displaymodes of DataCards based on the step.

So, for example, let's say some fields should only be visible in step 3, then you would set the Visible of datacards that should be visible to:  ThisItem.CurrentStep=3

For fields that should be visible at any time after a certain step, then it would be ThisItem.CurrentStep>2 (those would be visible after step 2 is done).

 

For fields that you don't want to be editable after a certain step, set the DisplayMode of the datacard to: If(ThisItem.Step > 4, View, Edit)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
BCLS776
Super User
Super User

It sounds like you are early in designing this app, so I'll keep my responses pretty high level. The short answer is: yes, you can do what you describe. Here are the basic steps:

  • Create a List with all the columns you will need, which include columns to record the results of your approval steps. I recommend single line of text columns that will contain a string such as "Yes" or "Approved"
  • Decide how you want to structure the app(s). A. You could do separate screens for each major part of your process - the user will be taken to the appropriate screen depending on the approval stage. Or, B. you can carefully craft the form's card's DisplayMode depending on the state of the selected record. Structure A is probably more intuitive for newer app Makers.
  • You can use a Patch() to update particular fields, but use the form controls as much as possible. Again, for newer Makers this is an easier path
  • You can use Power Automate flow(s) triggered by changes to the SharePoint List or the app itself to send out notifications/approval requests to the next designated team member. You can also use the Mail connector to automatically send out an email message. There are lots of ways to accomplish a notification.
  • Power Automate does have approval functionality, but for this case, it might be better to make your own as described above.

Go ahead and start on the first few steps, and once you get past those come back with specific questions or do some searches on here.

 

Hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,460)