cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pphan
Level: Powered On

Sequential Approval - Loop through Columns for selected file

Hello All,

 

Is it possible to loop through a selected file and get all the column name and values?

 

I am trying to create a workflow that send sequential approval for each document. Each document will have 3-7 approvers at anytime. The first approver will need to approve the document before it move on to the next. If the approver deny then the requestor will have to retrigger the flow to start off where the last person that approve. 

 

For example: Approver 1 Approved -> Move on to Approver 2 -> Approver 2 Denied -> Requestor Trigger Flow again -> Restart over at Approver 2.

 

The logic that I am trying to implement.

 

1. User will upload the document

2. User will add approver emails and in what order in the columns below

 

3. User trigger the work flow on the selected file

4. Flow will loops through all the columns and look for column name contains "Approver [1-7]", and check the status column. 

5. If Approver 1 have email address and status is blank then send an approval

6. If Approver 1 approve the document then update the column "status" and move on to the next approval. Repeat until completed.

7. If any of the approver deny a approval then update the status column and end the workflow

8. User will fix the document and retrigger the workflow and then it will start where the last approver deny the document. I guess it will check the status either it contain [blank] or deny and it contain an email. 

 

6 REPLIES 6
Community Support Team
Community Support Team

Re: Sequential Approval - Loop through Columns for selected file

Hi @pphan ,

 

Could you please share more details or a screenshot of the sharepoint library?

Will the sharepoint library have multiple approver column and it's corresponding status column?

 

Please share more details so we could better understanding your requirement and provide a proper workaround for you.

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

pphan
Level: Powered On

Re: Sequential Approval - Loop through Columns for selected file

Hello @v-yuazh-msft ,

 

Sorry, I thought I have attached the image. Please see screenshot below. I have multiple approver columns and status column corresponding to them. I want a workflow to loop through each column and grab the email for the send approval action. Before it send it check if the approver already approve or not. 

 

2019-02-21 09_23_29-Test_Team_Hub - Documents - All Documents.png

pphan
Level: Powered On

Re: Sequential Approval - Loop through Columns for selected file

Anyone know how to do this?

Bradleyman
Level: Power Up

Re: Sequential Approval - Loop through Columns for selected file

Did you ever get an answer or solution for this? We are trying to accomplish the same thing. 

Super User
Super User

Re: Sequential Approval - Loop through Columns for selected file

Hi,

 

i love the business case you are describing having designed and implemented as similar system some time back before flow arrived. 

 

2 thoughts:

1. I am wondering whether the current approach with Storing the individual approvers and their Staus at the file level will work or will be easy to program.

have you tried other approaches already?

 

if not I see the possible alternative route:

 

have an overall approval status for the file that you continuously update when ever a Approver makes a decision.

status could be

>>> approved by #1, approved by #2, ..., approval complete.

Or maybe even better

>>> awaiting approval #1, awaiting approval #2, ... approval complete

(makes it clear who needs to act next)

 

In order to avoid having 1 flow running for a very long time (7 approvers) you might be required to handle the actual cycling through approvers in a separate list,

Means that when approval work flow starts, the first flow actually is tasked to transfer each Approver name into a list that looks like:

document reference | approver email | status

once all entries in the approver lists are created , you trigger (http -> http) a second flow that cycles through the list and triggers the actual approval flow as individual approval processes, record individual approvals and update overall status on file level.

 

2. I am wondering whether allowing the file to be changed without erasing previously given signatures is a sound process from auditing perspective. The only person that sees the final version is the last approver and the recommendation might completely change between approver 1 and approver 7. Approvers 1 to 6 might agree to final version.

 

hope this helps. Keep us updated how project is progressing. It might be worth for a flow of the week article ...

 

erich

Super User
Super User

Re: Sequential Approval - Loop through Columns for selected file

https://flow.microsoft.com/en-us/blog/advanced-flow-of-the-week-send-parallel-approval-requests-to-a...

 

Gives another idea how to handle:

> the use of multi value column. 

How would it wok: Have all approvers in one multi value column field. Use an overall status as described above. In contrast to flow of the week article, don’t parallelize the approval process.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 73 members 3,493 guests
Please welcome our newest community members: